Skip to content

A bot template with command , event , button , selectmenus , slashcommands handler and error handlers. Made in Discord.JS V14

License

Notifications You must be signed in to change notification settings

StaffV77/DiscordBot-Template

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Changelog

  • Latest Discord.JS adaptation.
  • Refactored all command options with vast improvements.
  • switched to camel case across the template.
  • All handlers are now called managers.
  • Refactor of slashCommands handler(now manager) to now use Rest.put() and contextMenus is now managed by the slashCommands manager itself.
  • There is now a new method of registering global and guild slashCommands/contextMenus and guilds: [] properity is now removed. Follow up here to see the guide for new method of registering slashCommands/contextMenus.
  • expireAfter and limitUses command option is now removed.
  • Cooldown command option has been readded and has been divided into 3 options: guildCooldown, globalCooldown, channelCooldown. Each of them accepting Number of time delay in between each time command is ran Note: Provide time in milliseconds, Example: 5 seconds to be provided as 5000.

Documentation

Command Options Documentation
ReturnErrors Click Here
Ignore Click Here
AllClientPermissions Click Here
AllowBots Click Here
AllowInDms Click Here
AllUserPermissions Click Here
AnyClientPermissions Click Here
AnyUserPermissions Click Here
ChannelCooldown Click Here
GlobalCooldown Click Here
GuildCooldown Click Here
OnlyChannels Click Here
OnlyGuilds Click Here
OnlyRoles Click Here
OnlyUsers Click Here
OwnerOnly Click Here
Managers Documentation
MessageCommands Click Here
SelectMenus Click Here
Buttons Click Here
Events Click Here
SlashCommands Click Here
ModalForms Click Here

Features

  • Colorful and organized logging.
  • Room for customization as per user needs.
  • Includes management of MessageCommands, Buttons, SelectMenus, SlashCommands, ContextMenus and ModalForms.
  • Included variety of commonly-used command options (not applicable to Events.)
  • Included management of Custom Events.
  • Simple and understandable code.

Notes

  • Recommended NodeJS V16 & above.
  • Global slashCommands/ContextMenus may take time to refresh as it's fixed by discord.
  • Guild commands could potentially take time to refresh if perhaps too many different guilds commands.
  • Collections of where commands and events data is stored and used from.
<Client>.messageCommands //Message Commands Cache
<Client>.messageCommandsAliases // Message Commands Aliases Cache
<Client>.events // Client Events Cache
<Client>.buttonCommands // Button Interactions Cache
<Client>.selectMenus // SelectMenu Interactions Cache
<Client>.modalForms // ModalForms Interactions Cache
<Client>.slashCommands // SlashCommands Cache (Includes ContextMenus)

Installation

  • Clone the repository by either downloading it as a zip or running the command git clone https://github.com/rilecraft/discordbot-template.
  • Run the command npm i in the template's directory (Make sure npm is installed).
  • After all the required modules have been installed, goto the file Src/Credentials/Config.js and fill in the neccesary information.
  • Run the command node bot.js or node . to get the bot started!

Contribution

You are always welcome to make any contribution but make sure to follow these:

  • Fork the branch Unstable. Important: All changes must be first made to the Unstable branch.
  • Edit your forked repository and make your changes.
  • Open a pull request to the Unstable branch and it will be reviewed soon.
  • If everything checks out then the pull request would be merged.

About

A bot template with command , event , button , selectmenus , slashcommands handler and error handlers. Made in Discord.JS V14

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%