A template for creating Discord bots with Discord.js using TypeScript
- Run this codeblock in your terminal:
git clone https://github.com/BurakYs/bot-template.git cd bot-template npm install cp .env.template .env npm run build
- Fill in the
.env
file with your bot token - Run
npm run register-commands
to register the commands - Start the bot with
npm start
-
- To add a new language, add the file in
src/localizations
folder and updatesupportedLanguages
array insrc/config.ts
- Command names and descriptions are stored in the
src/localizations/commandData
folder. - Ensure the values in
supportedLanguages
match the files' name in thesrc/localizations
folder.
- To add a new language, add the file in
-
- You can create as many subfolders as you want in the
src/commands
folder - Refer to the available command configurations in the types file
- To give a subcommand a specific configuration, do this:
config: { someOtherConfig: true, configName: { '*': false, // Default configuration 'groupName subCommandName': true, // Specific configuration for this subcommand // or 'subCommandName': true } }
- To give a subcommand a specific configuration, do this:
- You can create as many subfolders as you want in the
This project is licensed under the MIT License - see the LICENSE file for details.