From 7eb8d7ab2ad2730936f2de290820b51a84525185 Mon Sep 17 00:00:00 2001 From: Avinash Reddy Date: Mon, 23 Sep 2019 17:36:18 +0530 Subject: [PATCH 1/2] fix demote module --- userbot/modules/admin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/userbot/modules/admin.py b/userbot/modules/admin.py index bd49311d6..8205fddbe 100644 --- a/userbot/modules/admin.py +++ b/userbot/modules/admin.py @@ -173,6 +173,7 @@ async def demote(dmod): await dmod.edit("`Demoting...`") rank = "admeme" # dummy rank, lol. user = await get_user_from_event(dmod) + user = user[0] if user: pass else: From fe7924f4ce1938f4d1c73516a3812d231502751d Mon Sep 17 00:00:00 2001 From: Avinash Reddy Date: Mon, 23 Sep 2019 17:42:55 +0530 Subject: [PATCH 2/2] Fix Text to speech module. --- userbot/modules/scrapers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/userbot/modules/scrapers.py b/userbot/modules/scrapers.py index 5309ea056..73bf0f4d9 100644 --- a/userbot/modules/scrapers.py +++ b/userbot/modules/scrapers.py @@ -321,13 +321,13 @@ async def text_to_speech(query): except RuntimeError: await query.edit('Error loading the languages dictionary.') return - tts = gTTS(message, LANG) + tts = gTTS(message, TTS_LANG) tts.save("k.mp3") with open("k.mp3", "rb") as audio: linelist = list(audio) linecount = len(linelist) if linecount == 1: - tts = gTTS(message, LANG) + tts = gTTS(message, TTS_LANG) tts.save("k.mp3") with open("k.mp3", "r"): await query.client.send_file(query.chat_id, "k.mp3", voice_note=True)