A Discord bot made with discord.js
Make sure to install the dependencies:
# pnpm (default)
pnpm install
# yarn
yarn install
# npm
npm installRename the .env.example file to .env in the root directory and update the values:
DISCORD_CLIENT_TOKEN=your_discord_bot_token
DATABASE_URL=your_database_url # e.g. postgres://user:password@localhost:5432/databaseSet up a PostgreSQL database and update the DATABASE_URL in the .env file.
DATABASE_URL=your_database_url # e.g. postgres://user:password@localhost:5432/databaseThe bot uses Prisma to interact with the database. To set up the database, run the following command:
prisma generateTo apply the migrations, run:
prisma migrateTo generate the Prisma client, run:
prisma generateFor more information, check the Prisma documentation.
pnpm startBlop comes with built-in internationalization support powered by i18next. This allows the bot to respond in multiple languages, providing a localized experience for users worldwide.
- Multi-language command names and descriptions
- Automatic translation of command responses
- Support for user/server language preferences
- Guild preferred language can be changed using the
/languagecommand - Discord's locale detection integration
Languages are configured in the bot's config file. To add a new language:
- Add language definition to the
i18n.languagesarray in the config - Create translation files in the
localesdirectory - Restart the bot to load the new language
The bot automatically detects available translations and will present commands and responses in the user's preferred language when available.
The bot works with command modules that can be enabled and disabled. To manage them, consult modules menu via the command
/modules.
- To get more details about how to use commands, do
/help <command>. <>means required command parameter.[]means optional command parameter.
Note: The image generation commands require the RawGO API to be deployed.
Clone the repository and follow the instructions in the README to set it up. Once the API is running, update the field
apis.rawgo.baseUrlin theconfigfile with the API URL.