A Discord bot made with discord.js
Make sure to install the dependencies:
# pnpm (default)
pnpm install
# yarn
yarn install
# npm
npm install
Rename 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/database
Set 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/database
The bot uses Prisma to interact with the database. To set up the database, run the following command:
prisma generate
To apply the migrations, run:
prisma migrate
To generate the Prisma client, run:
prisma generate
For more information, check the Prisma documentation.
pnpm start
Blop 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
/language
command - 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.languages
array in the config - Create translation files in the
locales
directory - 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.baseUrl
in theconfig
file with the API URL.