givies-framework
v2022.706.0
Published
A framework to facilitate the development of Discord bots using Eris
Downloads
20
Maintainers
Readme
Givies-Framework
A framework to facilitate the development of Discord bots using Eris.
Design Features
This framework includes amazing features such as:
- Giveaways
- Utility Classes
- Logger
- RichEmbed Constructor
- and more...
Developing a Discord bot using Givies-Framework
- Requirement: You will need NodeJS v16.6.0+ installed.
To start developing a Discord bot, you may first initialize a new NodeJS project and install the necessary dependencies. Here's a simple steps how to get done:
- Initialize a NodeJS project:
npm init -y
- Install Givies-Framework and Eris:
npm install eris givies-framework
- Open your project using any suitable code editor
Code Example:
Below is a very basic example how it works in JavaScript.
const Eris = require("eris");
const GiviesFramework = require("givies-framework");
const client = new Eris.Client("Bot <BOT_TOKEN>", {
intents: [
"guilds",
"guildMessages"
]
});
const logger = new GiviesFramework.Utils.Logger();
client.on("ready", () => {
logger.info({ message: `${client.user.username} is Ready`, subTitle: "Discord::Ready", title: "ERIS" });
});
client.on("messageCreate", async (message) => {
if (message.author.bot) return;
if (message.content === "!ping") {
const embed = new GiviesFramework.Utils.RichEmbed();
.setTitle("Bot's ping")
.setDescription(`Pong! | ${message.member.guild.shard.latency}ms`)
.setColor(0x7289DA);
return client.createMessage(message.channel.id, { embed: embed });
}
});
client.connect();
Contributing
Any contributions can be made via pull requests.
If you are confused where to get started, the issue-tracker is the best place to track any current existing issues.
Note: Please make sure to follow its Contributing Guidelines before proceeding.
License
This framework is released under the MIT License.