Skip to content

Commit

Permalink
Fixed User mode + voice-call (UsergeTeam#334)
Browse files Browse the repository at this point in the history
* fixed User mode

* fixed voice-call
  • Loading branch information
Krishna-Singhal authored May 19, 2021
1 parent c84dac9 commit f428ecb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion userge/core/methods/decorators/raw_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions userge/plugins/utils/voice_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down

0 comments on commit f428ecb

Please sign in to comment.