A discord bot integrating with the latest discord features with multiple translation backend
1.3K
An open source discord bot using the latest discord integration features and supporting multiple translation backend
Create a docker-compose.yml file and set the environment variables (check the Environment variables section for more information)
version: "3.7"
services:
open-discord-translator:
container_name: open-discord-translator
image: ghcr.io/kalitsune/open-discord-translator:latest
restart: always
environment:
- TOKEN=[your token here] # https://discord.com/developers/applications
- GUILD= # if set, the commands will only be available in this guild whose ID is linked here
- SKIP_COMMAND_VALIDATION=false # if set to true, the bot will not check if the commands are up to date
- ACCENT_COLOR=Blurple # the color of the embeds
- DELETE_BUTTON_TIMEOUT=10 # the time in s before the delete button disappears (leave empty for infinite)
- TRANSLATION_API_DRIVER=google # paid_google.js or deepl
- SELECTED_LANGUAGES=en,es,fr,de,it,ja,ko,pt,ru,zh-CN,zh-TW,pl,nl,sv,ar,cs,da,fi,el,hi,hu,id,no,la,ro # the languages you want to translate to and from (comma separated)
- GOOGLE_API_KEY= # your google API key (paid google driver)
- DEEPL_API_KEY= # your deepl auth key (deepl driver)
- DATABASE_PATH=database.sqlite # the path to the database file
- DATABASE_DRIVER=sqlite # sqlite is the only driver supported for now but feel free to add more
volumes:
- open-discord-translator:/app/database.sqlite
volumes:
open-discord-translator:
then start the bot
docker-compose up -d
to invite the bot, use the link printed in the console
docker volume create open-discord-translator
docker run -d \
--name open-discord-translator \
-e TOKEN=[your token here] \
-e GUILD= \
-e SKIP_COMMAND_VALIDATION=false \
-e ACCENT_COLOR=Blurple \
-e DELETE_BUTTON_TIMEOUT=10 \
-e TRANSLATION_API_DRIVER=google \
-e SELECTED_LANGUAGES=en,es,fr,de,it,ja,ko,pt,ru,zh-CN,zh-TW,pl,nl,sv,ar,cs,da,fi,el,hi,hu,id,no,la,ro \
-e GOOGLE_API_KEY= \
-e DEEPL_API_KEY= \
-e DATABASE_PATH=database.sqlite \
-e DATABASE_DRIVER=sqlite \
-v open-discord-translator:/app/database.sqlite \
ghcr.io/kalitsune/open-discord-translator:latest
to invite the bot, use the link printed in the console
| Variable | Description | Default value |
|---|---|---|
TOKEN | The discord bot token | none |
GUILD | The guild ID where the bot will be restricted to | none |
SKIP_COMMAND_VALIDATION | If set to true, the bot will not check if the commands are up to date | false |
ACCENT_COLOR | Color used for the bot embeds can be a number, hex or one of those | Blurple |
DELETE_BUTTON_TIMEOUT | The time in seconds before the delete button for the send disappear (leave empty for infinite) | 10 |
TRANSLATION_API_DRIVER | The translation API to use (check supported drivers) | google |
SELECTED_LANGUAGES | The languages to use for the translation command, if empty, the first 25 supported languages returned by the translation driver will be used | [CSV, check .env] |
GOOGLE_API_KEY | Your google api key, only needed if you use the google paid translation API | none |
DEEPL_API_KEY | Your deepl auth key, only needed if you use the deepl translation API | none |
DATABASE_DRIVER | The database driver to use (check supported drivers) | sqlite |
SQLITE_PATH | The path to the sqlite database file, only needed if you use the sqlite database driver | ./database.sqlite |
| Driver name | Description |
|---|---|
google | The google translation API for free, the threshold might be low |
paid_google | The google translation API, you need to set the GOOGLE_API_KEY environment variable |
deepl | The deepl translation API, you need to set the DEEPL_API_KEY environment variable |
| Driver name | Description |
|---|---|
sqlite | The sqlite database driver, you need to set the SQLITE_PATH environment variable |
Content type
Image
Digest
sha256:70a43e1c7…
Size
401.5 MB
Last updated
almost 3 years ago
docker pull kalithekitsune/open-discord-translator