A Slack bot that provides real-time translation capabilities using DeepL's translation API. Users can translate messages directly within Slack using commands or shortcuts.
/translatecommand for direct text translation- Message shortcut for translating existing messages
- Customizable target language and formality settings
- Interactive message editing before sending
- Persistent user preferences
- Node.js version 18 or higher
- A DeepL API authentication key (Free or Pro account)
- Slack workspace with appropriate permissions
- Clone the repository
- Install dependencies:
npm install- Create a
.envfile with the following variables:
DEEPL_API_KEY=your_deepl_api_key
SLACK_BOT_TOKEN=your_slack_bot_token
SLACK_SIGNING_SECRET=your_slack_signing_secret
SLACK_APP_TOKEN=your_slack_app_token
- Start the bot:
npm run dev/translate [text]- Translate text to your configured target language/settings- Configure your translation preferences (target language and formality)
- Message shortcut: Right-click any message to translate it
Configure your preferences using the /settings command:
- Target Language: Choose your preferred translation language
- Formality: Select between Automatic, Formal, or Informal translation style
User settings are automatically persisted in db.json.
Using .env file:
- Copy
.env.exampleto.env - Edit
.envwith your credentials - The
.envfile will not be committed to git
This project is licensed under the MIT License - see the LICENSE file for details.