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 pnpm install cp .env.template .env pnpm build
- Fill in the
.env
file with your bot token - Run
pnpm register-commands
to register the commands - Start the bot with
pnpm start
-
- Uses the
i18next
library for localization - 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
- Uses the
-
- 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
-
interaction.success()
: Sends a success messageinteraction.error()
: Sends an error messageinteraction.translate()
: Translates a key
This project is licensed under the MIT License - see the LICENSE file for details.