id command show reply file_id

This commit is contained in:
canvex 2024-02-13 21:12:28 +08:00 committed by GitHub
parent e5f74f4d97
commit 376e858db7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,6 +36,12 @@ async def userid(message: Message):
text += f"protected: `{str(msg_from.has_protected_content)}" + "`\n" text += f"protected: `{str(msg_from.has_protected_content)}" + "`\n"
if reply: if reply:
text += "\n" + lang("id_hint") + "\nMessage ID: `" + str(reply.id) + "`" text += "\n" + lang("id_hint") + "\nMessage ID: `" + str(reply.id) + "`"
if reply.photo and reply.photo.file_id:
text += "\nphoto_id: `" + str(reply.photo.file_id) + "`"
if reply.video and reply.video.file_id:
text += "\nvideo_id: `" + str(reply.video.file_id) + "`"
if reply.document and reply.document.file_id:
text += "\ndocument_id: `" + str(reply.document.file_id) + "`"
try: try:
text += "\n\n**User**\nid: `" + str(reply.from_user.id) + "`" text += "\n\n**User**\nid: `" + str(reply.from_user.id) + "`"
if reply.from_user.is_bot: if reply.from_user.is_bot: