You can use as a template for your bots, you are free to modify it in your own way. The discord.js module and the Sheweny framework was used to create this small project.
- Visual Studio Code (you can use another code editor if you want, this is for people who don't have one)
- Node.js (18.14.0+)
- Clone this repository
- Install the dependencies:
npm install
- Change the name of the
.env.example
file to.env
- Fill in the required information inside (this will be explained in the notes of the file)
- Start the bot:
npm start
Now everything should run smoothly! 🎉
const { Command } = require("sheweny");
module.exports = class ExampleCommand extends Command {
constructor(client) {
super(client, {
name: "example",
type: "SLASH_COMMAND",
description: "Example command",
});
}
execute(interaction) {
interaction.reply({ content: "This is an example of a Slash command. Learn more about building a command with Sheweny: https://sheweny.js.org/doc/structures/Command.html", ephemeral: true });
}
};
const { Event } = require("sheweny");
module.exports = class Ready extends Event {
constructor(client) {
super(client, "ready", {
description: "Log in the console when the bot is successfully connected",
once: true,
});
}
execute(client) {
console.log("Connected as " + client.user.tag + "");
}
};