Skip to content

Commit

Permalink
feature: pass start arg
Browse files Browse the repository at this point in the history
  • Loading branch information
litnialex committed Sep 22, 2024
1 parent 6f8fd81 commit aa981ee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions proxybot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit aa981ee

Please sign in to comment.