Skip to content

Commit

Permalink
Update ids.py (UsergeTeam#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
Krishna-Singhal authored Jul 23, 2020
1 parent b3669df commit 0fd55e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion userge/plugins/tools/ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
'header': "display ids",
'usage': "reply {tr}ids any message, file or just send this command"})
async def getids(message: Message):
out_str = f"👥 **Chat ID** : `{message.chat.id}`\n💬 **Message ID** : `{message.message_id}`"
replied = message.reply_to_message
message_id = replied.message_id if replied else message.message_id
out_str = f"👥 **Chat ID** : `{message.chat.id}`\n💬 **Message ID** : `{message_id}`"
if message.reply_to_message:
if message.reply_to_message.from_user:
out_str += f"\n🙋‍♂️ **From User ID** : `{message.reply_to_message.from_user.id}`"
Expand Down

0 comments on commit 0fd55e5

Please sign in to comment.