Compare commits

..

No commits in common. "69daf5cccef6ef6b88edbf6b1fb7afd4a475ffc1" and "90ed10f25b5109ab39aad1e5f2040a312ecfc20c" have entirely different histories.

View File

@ -3,6 +3,7 @@ import os
import googletrans
import discord
from discord import app_commands
from discord.ext import commands
discord_bot_token = os.environ['TOKEN_DISCORD']
@ -52,8 +53,7 @@ async def on_message(ctx: discord.Message):
for channel in translator_category.channels:
if detected_lang != channel.name:
translated = await translator.translate(str(ctx.clean_content), channel.name)
translated_message = translated.text
translated_message = await translator.translate(str(ctx.clean_content), channel.name).text
if str(ctx.clean_content).lower() == str(translated_message).lower():
return
@ -73,5 +73,6 @@ async def on_message(ctx: discord.Message):
###
if __name__ == "__main__":
bot_client.run(discord_bot_token)
bot_client.run(discord_bot_token)