A bot which will keep your server clean of other languages!
Table of Contents
This project is a project which was made for the 2021's Hackapalooza (Winner of the Best Use of Google Cloud prize). It consists on a live translator for discord which allows to limit languages to channels and translates which aren't written in it.
This means, you can set up a channel so it only accepts messages on English and if they're not written in it, it just translates the message in real time
This bot uses several libraries and technologies to work:
- Discord.py for the discord Bot
- Gspread for the Google Sheets API integration with Python
- LibreTranslate PY for the detection and translation using LibreTranslate
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
You just need to have Python and Pip installed on your machine
- Clone the repo
git clone https://github.com/alvaroartano/Discord-Live-Translator.git
- Install NPM packages
pip install -r requirements.txt
- Create a new google sheet with this layout
- Create a
.env
file and fill it up with your discord bot tokenDISCORD_TOKEN=<token> GOOGLE_SHEET_NAME=Database
- Create a new Google Cloud API key for google sheets and download the key in your folder with the name
google_sheets_api_key.json
- Give read and write perms to the google sheet to the email that was created during the api key creation
- For running the bot just run
python bot.py
- Then, add it to a server and set up a channel using
!setup <iso code>
Here you have a list of ISO codes, for example!setup en
for English - Test it!
Alvaro Artano - @alvaroartano - hello@alvaroartano.me