feat: display topic title and ID in forum group (#86)
All checks were successful
Docker Dev Build / docker build and publish (push) Successful in 7m39s

This commit is contained in:
pplulee 2024-09-06 22:46:03 +08:00 committed by xtaodada
parent b9efbecea3
commit 6d892917b4
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -28,6 +28,9 @@ async def userid(message: Message):
text += f"username: @{msg_from.username}" + "\n"
if msg_from.type in [ChatType.SUPERGROUP, ChatType.CHANNEL]:
text += f"title: `{msg_from.title}" + "`\n"
if message.topic:
text += f"topic title: `{message.topic.title}`\n"
text += f"topic ID: `{message.topic.id}`\n"
try:
if msg_from.username:
text += f"username: @{msg_from.username}" + "\n"