Skip to content

Commit

Permalink
handle voice_call from_user being None
Browse files Browse the repository at this point in the history
  • Loading branch information
rking32 committed Sep 18, 2021
1 parent 4860520 commit 383fc41
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions userge/plugins/utils/voice_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,8 +593,12 @@ async def yt_down(msg: Message):
await message.delete()

def requester():
if not msg.from_user:
return None
replied = msg.reply_to_message
if replied and msg.client.id == msg.from_user.id:
if not replied.from_user:
return None
return replied.from_user.mention
return msg.from_user.mention

Expand Down

0 comments on commit 383fc41

Please sign in to comment.