From 8d1e9a0962915c7545eb1febbb284a3c14a711b8 Mon Sep 17 00:00:00 2001 From: yasirarism <55983182+yasirarism@users.noreply.github.com> Date: Fri, 16 Dec 2022 10:23:28 +0700 Subject: [PATCH] Update misc_tools.py --- misskaty/plugins/misc_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misskaty/plugins/misc_tools.py b/misskaty/plugins/misc_tools.py index 2ff2b696..0ff7a85c 100644 --- a/misskaty/plugins/misc_tools.py +++ b/misskaty/plugins/misc_tools.py @@ -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: {str(err)}")