This code will power a bot user on Slack, listening for the phrase translate to <language>:
and performing a translation on the text using the Yandex Translator API.
To run this bot on your Slack:
-
- clone this repo:
git clone git@github.com:kylestetz/simple-translate-bot.git
- clone this repo:
-
npm install
-
- Sign up for a Yandex Translator API key key, which requires - making a Yandex account
-
- Create a new bot integration in your Slack
-
- Run the
index.js
file with your tokens:
- Run the
SLACK_TOKEN=xoxb-123456 YANDEX_TOKEN=trnsl.1.1.123456 node index.js
✌️