From f428ecb477264e659f2438b74c51afce0367cdf0 Mon Sep 17 00:00:00 2001 From: Krishna-singhal <65902764+Krishna-Singhal@users.noreply.github.com> Date: Wed, 19 May 2021 15:58:48 +0530 Subject: [PATCH] Fixed User mode + voice-call (#334) * fixed User mode * fixed voice-call --- userge/core/methods/decorators/raw_decorator.py | 4 +++- userge/plugins/utils/voice_call.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/userge/core/methods/decorators/raw_decorator.py b/userge/core/methods/decorators/raw_decorator.py index 49e773c92..a36b78c4c 100644 --- a/userge/core/methods/decorators/raw_decorator.py +++ b/userge/core/methods/decorators/raw_decorator.py @@ -303,7 +303,9 @@ async def template(r_c: Union['_client.Userge', '_client.UsergeBot'], r_m.from_user and r_m.from_user.id in Config.SUDO_USERS ) or ( r_m.from_user - and r_m.from_user.id in Config.OWNER_ID + and len(Config.OWNER_ID) > 1 + and r_m.from_user.id in Config.OWNER_ID[1:] + # TODO: hmm ) ): cond = True diff --git a/userge/plugins/utils/voice_call.py b/userge/plugins/utils/voice_call.py index a8d3ad41b..980323033 100644 --- a/userge/plugins/utils/voice_call.py +++ b/userge/plugins/utils/voice_call.py @@ -261,11 +261,11 @@ async def play_music(msg: Message): mesg = await reply_text(msg, f"Searching `{msg.input_str}` on YouTube") title, link = await _get_song(msg.input_str) if link: - await mesg.delete() if PLAYING: msg = await reply_text(msg, _get_scheduled_text(title, link)) else: - msg.text = f"[{title}]({link})" + msg = await msg.edit(f"[{title}]({link})") + await mesg.delete() QUEUE.append(msg) else: await mesg.edit("No results found.")