I want to be able to handle a command like this:
https://t.me/MyBot?start=aff_1234
How will I do it? I've tried this and it hasn't worked:
from pyrogram import Client, filters
# ......
# ......
c = Client("bot"...)
hd = MessageHandler(main_handler)
c.add_handler(hd)
# ......
async def main_handler(client, message):
try:
# when a new user connects as
# https://t.me/MyBot?start=aff_1234
# this will never get fired
# why not?
print("debug #1")
if message.text.startswith('/start'):
parts = message.text.split('=aff_')
# ..............