


I created this bot for use on a Japanese learning Discord server. Custom emoji for Discord communities are also sometimes "demojified" (converted to their emoji title), and returned to the discord chat as-is in the translation output. For example, if a sentence that is 99% English contains a single Japanese character, it will be "translated" back into English.

However, in rare cases it can result in unexpected translation output. This method is fast (yielding fast translation throughput), and works as intended for the bot's use case. 😂 -> : joy :), then checking if the string is able to be encoded in ASCII.

Custom Discord community emojis excluded from output, or "demojified" (replaced with emoji name)īoth of the above issues are because of how the bot checks source language of input text: by convering unicode emojis to their english representation (e.g.Text containing any non-ASCII text (excluding emojis) is treated as Japanese.Feature ideas are also welcome in the issues tab! Known Issues If you'd like to contribute, you're welcome to fork the repository and create a pull request for a new feature implementation. These are on my long-term to-do list for the bot, but will likely require significant refactoring to set up, so I'm not sure when they'll be available. There are many additional features I'd like to add, such as private translation via slash commands (to further reduce chat clutter) and pronunciation lookup (using Forvo's API). Additionally, users can reply to any message with "!translate" to have the entire message translated. As of now, users can translate Japanese or English phrases by entering: "!translate " into the Discord chat. The bot is currently capable of Japanese to English translation, and English to Japanese translation (in most cases - see wiki for details).
#Discord translate bot german free
After that, you should be able to run the bot and change it as needed!įeel free to reach out to me (Mitchell) on Discord if you have any questions. To adapt the bot to your own use case (different languages, translation tools, slash commands, etc.), fork the repository and create your own DEEPL_API_KEY, DISCORD_BOT_SECRET, and DISCORD_BOT_AUTHOR_ID environment variables. To use the bot for Japanese-English translation, you can add my deployment called "KomiBot" to your Discord server by clicking here. See wiki for details & additional feature plans/ideas.
#Discord translate bot german how to
This functionality allows users to quickly look up words they don't know how to say in Japanese, translate words they don't understand into English, or translate entire phrases between the two languages - all without having to switch back & forth between a dictionary website and Discord. (The abbreviation "!tl" can also be used, in place of "!translate".) Users can enter "!translate " into the Discord chat to have their text translated, or reply to a message with "!translate" to have the message they replied to translated. This bot translates Discord chat messages from Japanese to English (and vice versa). Discord Bot with Translation FunctionalityĬreated using the Discord.py python library for Discord chat integration, and DeepL's translation API.
