mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 17:44:50 +00:00
Update misc_tools.py
This commit is contained in:
parent
27dda75ab6
commit
8d1e9a0962
1 changed files with 2 additions and 2 deletions
|
|
@ -132,10 +132,10 @@ async def translate(client, message):
|
|||
my_translator = GoogleTranslator(source='auto', target=target_lang)
|
||||
try:
|
||||
tresult = my_translator.translate(text=text)
|
||||
await msg.edit(f"Translation using source = {my_translator.source} and target = {my_translator.target}\n\n-> {result}")
|
||||
return await msg.edit(f"Translation using source = {my_translator.source} and target = {my_translator.target}\n\n-> {result}")
|
||||
except MessageTooLong:
|
||||
url = await rentry(tresult)
|
||||
await msg.edit(f"Your translated text pasted to rentry because has long text:\n{url}")
|
||||
return await msg.edit(f"Your translated text pasted to rentry because has long text:\n{url}")
|
||||
except Exception as err:
|
||||
await msg.edit(f"ERROR: <code>{str(err)}</code>")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue