Fix little error of chat name

This commit is contained in:
iwumingz 2022-04-09 16:53:29 +08:00
parent 9312d8e72b
commit 1e030b29b0

View File

@ -8,9 +8,9 @@ from tools.helpers import get_fullname
async def get_id(_: Client, msg: Message): async def get_id(_: Client, msg: Message):
"""直接使用或者回复目标消息从而获取各种IDs""" """直接使用或者回复目标消息从而获取各种IDs"""
text = f"Message ID: `{msg.message_id}`\n\n" \ text = f"Message ID: `{msg.message_id}`\n\n" \
f"Chat Title: `{msg.chat.title}`\n" \ f"Chat Title: `{msg.chat.title or msg.chat.first_name}`\n" \
f"Chat Type: `{msg.chat.type}`\n" \ f"Chat Type: `{msg.chat.type}`\n" \
f"Chat ID: `{msg.chat.id}`" \ f"Chat ID: `{msg.chat.id}`"
replied_msg = msg.reply_to_message replied_msg = msg.reply_to_message
if replied_msg and replied_msg.from_user: if replied_msg and replied_msg.from_user: