Translation
The Translation module integrates the DeepL API for translating text messages and Groq Whisper for transcribing voice messages. It works through the context menu (right-click on a message).
Enabling the Module
- Dashboard → Your server → toggle Translation
- Click Edit and enter the DeepL API key
- Optionally: enter the Groq API key (for audio transcription)
- Save changes
The Translation module requires a DeepL API key to function. Without it, translation will not be possible. Keys are encrypted (Fernet) before being saved to the database.
Get a free key at: https://www.deepl.com/pro-api
Configuration
API keys are stored at the guild config level (not in cog_settings):
| Option | Type | Description |
|---|---|---|
deepl_api_key_encrypted | string | Encrypted DeepL API key |
groq_api_key_encrypted | string | Encrypted Groq API key (optional) |
Dashboard
The edit panel contains:
- DeepL API Key — password field (masked)
- Groq API Key — password field (optional, for audio transcription)
- Key status information (configured / missing)
Context Menus
After enabling the module, the message context menu (right-click → Apps) shows:
Translate Message
Translates the message text to the user's preferred language.
Flow:
- Extracts text from the message (content + embed title/description/fields/footer)
- Checks user's language preferences
- If no preference — displays a modal asking for language selection
- Translates via DeepL API
- Displays the translation ephemerally
Transcribe & Translate
Transcribes a voice/audio message and translates the transcription.
Flow:
- Looks for an audio attachment in the message
- Checks size (max 25 MB)
- Checks user's language preferences
- Transcribes via Groq Whisper API
- Translates the transcription via DeepL API
- Displays both (original + translation) in an ephemeral embed
.ogg, .mp3, .wav, .m4a, .flac, .webm, .mp4 and any files with content-type audio/* or video/* (voice messages).
Commands
/setlang
Sets the user's preferred translation language (global, cross-server).
Displays a dropdown menu with pagination (25 languages per page) — after selection, saves the preference to the database.
/languages
Displays a list of all supported DeepL languages (ephemeral).
Supported Languages
DeepL supports 31 target languages:
| Code | Language |
|---|---|
| BG | Bulgarian |
| CS | Czech |
| DA | Danish |
| DE | German |
| EL | Greek |
| EN-GB | English (British) |
| EN-US | English (American) |
| ES | Spanish |
| ET | Estonian |
| FI | Finnish |
| FR | French |
| HU | Hungarian |
| ID | Indonesian |
| IT | Italian |
| JA | Japanese |
| KO | Korean |
| LT | Lithuanian |
| LV | Latvian |
| NB | Norwegian |
| NL | Dutch |
| PL | Polish |
| PT-BR | Portuguese (Brazilian) |
| PT-PT | Portuguese (European) |
| RO | Romanian |
| RU | Russian |
| SK | Slovak |
| SL | Slovenian |
| SV | Swedish |
| TR | Turkish |
| UK | Ukrainian |
| ZH | Chinese (simplified) |
Language Preferences
Target language resolution order:
translator_langin theuser_language_prefstable (set via/setlang)- User's interface language (from LanguageManager)
- Modal asking for manual selection
The preference is global — once set, it works on all servers with ArcBot.
Limits
| Limit | Value |
|---|---|
| Text to translate | 5000 characters |
| Audio file | 25 MB |
| API key cache | 30 minutes |
| API timeout | 30s (DeepL), 120s (Groq) |
Error Handling
| HTTP Code | Action |
|---|---|
| 403 | Invalid API key — cache invalidated |
| 456 | DeepL limit exhausted — user notified |
| Other | Generic "API error" message |
Listened Events
The module does not listen to events — it works exclusively through context menus and slash commands.
Tips
- Use
/setlangonce — the bot will remember your language permanently - DeepL Free allows 500,000 characters/month — sufficient for most servers
- Groq API is optional — without it, "Transcribe & Translate" won't be available
- DeepL API keys ending with
:fxare free keys
Translations are displayed ephemerally (visible only to the user). Message content is sent to the DeepL/Groq API for processing.