Run: npm run dev or yarn dev
Command | Comment |
---|---|
npm start | Runs discord bot |
npm run deploy | deploy slash command loads to discord bot |
Fill in the .env
file within the project with your information:
TOKEN =
BOT_ID =
PREFIX =
Usages:
// one way
const Hello : ITypes.ISlashCommand = {}
export default Hello
// two way
export default {} as ITypes.ISlashCommand
- events loader
- slash commands loader
- prefix commands loader
- deploy command
- defined types
type | comment | meets | use |
---|---|---|---|
IPrefixCommand | Used for prefix commands | name, execute | {name: "exampleCommand"} as IPrefixCommand |
PrefixCommandArgs | Is a type given to command values | client, message, args | execute({client, message, args} : PrefixCommandArgs){} |
ISlashCommand | Used for slash commands | data, execute | {name: "exampleCommand"} as ISlashCommand |
SlashCommandArgs | Is a type given to command values | client, interaction | execute({client, interaction} : SlashCommandArgs){} |
IEvent | A type given to event files | name, once, execute | IEvent<ActivityType.ClientReady> |