From aa981ee9903b34090806ae512e965ee646d0a85e Mon Sep 17 00:00:00 2001 From: Sasha Li Date: Sun, 22 Sep 2024 22:54:25 +0300 Subject: [PATCH] feature: pass start arg --- proxybot/bot.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/proxybot/bot.py b/proxybot/bot.py index efabecc..d040b42 100644 --- a/proxybot/bot.py +++ b/proxybot/bot.py @@ -442,6 +442,14 @@ async def forward(update, bot_data) -> dict: if is_start_msg and bot_data.get('setautoreply'): jobs.append(update._bot.send_message(u_id, bot_data['setautoreply'])) + # Pass start argument, example: https://t.me/example_bot?start=from_source + if is_start_msg and len(update.message.text) > 7: + jobs.append(update._bot.send_message( + track['p_chat'], + update.message.text[7:], + message_thread_id=track.get('p_thread'), + )) + # Forward message try: sent_msg = await update._bot.forward_message(