https://github.com/deeplcom/slackbot-example
https://github.com/deeplcom/slackbot-example
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/deeplcom/slackbot-example
- Owner: DeepLcom
- License: mit
- Created: 2025-01-28T13:14:07.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-30T15:32:28.000Z (10 months ago)
- Last Synced: 2025-06-22T23:42:02.341Z (8 months ago)
- Language: JavaScript
- Size: 29.3 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DeepL Slack Translation Bot
[](https://github.com/DeepLcom/deepl-mcp-server/blob/main/LICENSE)
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.
## Features
- `/translate` command for direct text translation
- Message shortcut for translating existing messages
- Customizable target language and formality settings
- Interactive message editing before sending
- Persistent user preferences
## Requirements
- Node.js version 18 or higher
- A DeepL API authentication key (Free or Pro account)
- Slack workspace with appropriate permissions
## Setup
1. Clone the repository
2. Install dependencies:
```bash
npm install
```
3. Create a `.env` file 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
```
4. Start the bot:
```bash
npm run dev
```
## Usage
### Commands
- `/translate [text]` - Translate text to your configured target language
- `/settings` - Configure your translation preferences (target language and formality)
### Shortcuts
- Message shortcut: Right-click any message to translate it
### Settings
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`.
## Development
### Environment Variables
Using .env file:
- Copy `.env.example` to `.env`
- Edit `.env` with your credentials
- The `.env` file will not be committed to git
## License
This project is licensed under the MIT License - see the LICENSE file for details.