Update misc_tools.py

This commit is contained in:
yasirarism 2022-12-16 10:10:55 +07:00 committed by GitHub
parent 3543e3c6df
commit 1bd2561aee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,7 +135,7 @@ async def translate(client, message):
'text': text
}
try:
tekstr = (await http.post("https://deep-translator-api.azurewebsites.net/google/", data=json_dara)).json()["translation"]
tekstr = (await http.post("https://deep-translator-api.azurewebsites.net/google/", json=json_dara)).json()["translation"]
await msg.edit(f"<code>{tekstr}</code>")
except MessageTooLong:
url = await rentry(tekstr)