This bot allows users to translate messages in Discord using the DeepL API.
- Create a Discord application and bot at https://discord.com/developers/applications
- Get a DeepL API key from https://www.deepl.com/pro-api
- Copy your Discord bot token and DeepL API key
- Add them to the .env file:
- DISCORD_TOKEN=your_discord_token_here
- DEEPL_API_KEY=your_deepl_api_key_here
- Install dependencies:
npm install
- Start the bot:
npm start
Use the following command to translate text:
!translate [language_code] [text]
Example:
!translate FR Hello, how are you?
Available language codes:
- EN (English)
- FR (French)
- DE (German)
- ES (Spanish)
- IT (Italian)
- NL (Dutch)
- PL (Polish)
- PT (Portuguese)
- RU (Russian)
- JA (Japanese)
- ZH (Chinese) And more...