Skip to content

A simple Discord bot that translates messages into various languages using the Googletrans library. Users can issue the !translate <language_code> <message> command to get translations directly in the chat. Easy to set up and use, perfect for multilingual servers.

License

Notifications You must be signed in to change notification settings

fenooooo/Discord-Translation-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Discord Translation Bot

This bot translates messages to various languages using the !translate <language_code> <message> command. Built with Python, Discord.py, and Googletrans.

Features

  • Translates text to different languages
  • Simple command-based usage

Setup

  1. Clone the repository.

  2. Install dependencies:

    pip install discord.py googletrans==4.0.0-rc1 python-dotenv
    
  3. Create a .env file and add your Discord bot token:

    DISCORD_TOKEN=your_discord_bot_token
    
  4. Run the bot:

    python bot.py
    

Usage

Use the !translate command followed by the language code and the message you want to translate.

Example:

!translate es Hello, how are you?

This will translate the text to Spanish.

Language Codes

Here is a list of common language codes you can use with the bot:

  • en: English
  • es: Spanish
  • fr: French
  • de: German
  • it: Italian
  • pt: Portuguese
  • zh-cn: Chinese (Simplified)
  • zh-tw: Chinese (Traditional)
  • ja: Japanese
  • ko: Korean
  • ru: Russian
  • ar: Arabic
  • hi: Hindi
  • bn: Bengali
  • he: Hebrew
  • id: Indonesian
  • tr: Turkish
  • vi: Vietnamese
  • th: Thai
  • pl: Polish

For a complete list of language codes, you can refer to the Googletrans documentation.

Requirements

  • Python 3.6 or higher
  • discord.py
  • googletrans==4.0.0-rc1
  • python-dotenv

About

A simple Discord bot that translates messages into various languages using the Googletrans library. Users can issue the !translate <language_code> <message> command to get translations directly in the chat. Easy to set up and use, perfect for multilingual servers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages