GoodBot
GoodBot is a simple framework for building discord bots in JS.
Installation
Use the package manager npm to install goodbot.
npm install goodbot
Usage
To initialize the bot:
const Client = ; // importing goodbotconst path = ; // importing path const client = prefix: "!" // the bot's prefix ownerID: "465905397874688000" // your discord user id inviteLink: "https://discord.gg/botinvite" // the invite for your bot commandsFolder: path // the commands folder, You need to make It; clientstart"token"; // to start the bot with the token
To create Commands:
// to create commands You first need to make Categoriesclient; // to create 1 category // to create more than 1 categories at onceclient; // You need to create a folder inside the commandsFolder for each category
After that you need to make a file for the command inside one of the categories folders. Then to make the command write this in the command's file:
moduleexports = name: "ping" // command name description: "ping command description" // command description argsType: 'multiple' // not required // argsType set the 'args' parameter options, // 'single' => all the args in a single string // 'multiple' => all the args in a string array { messagechannel; // ... };
More
Default help command
To use the default help command:
client;
Get a commandCategory
How to get a commandCategory:
clientcommandsCategories;
Get a command
How to get a command:
clientcommandsCategories;