support threaded groups

This commit is contained in:
Crystal
2025-12-01 09:57:03 +01:00
parent 1e2f715ff3
commit fd62653dce
3 changed files with 15 additions and 4 deletions

6
bot.py
View File

@@ -4,7 +4,11 @@ import syms as _bot_syms
async def bot_start(update, context):
chat_id = update.effective_chat.id
await update.message.reply_text(f'wb_alert bot: <code>{chat_id}</code>', parse_mode='HTML')
try: thread_id= update.message.message_thread_id
except: thread_id= None
txt= f'wb_alert bot: <code>{chat_id}</code>'
if thread_id: txt= f'wb_alert bot: <code>{chat_id}</code> thread: <code>{thread_id}</code>'
await update.message.reply_text(txt, parse_mode='HTML')
print(f'alert_bot bot_start: {chat_id}')
def main():