谁在电报中点击我的Deep Links?

时间:2017-06-12 07:57:48

标签: python bots telegram

我正在为吸收成员创建一个机器人。这样的机器人行动: 我发送一个唯一的链接到我的机器人用户,然后用户发送自己的唯一链接到其他。通过这种方式其他吸收到我的机器人。 我为机器人创建了一个Deep Link,现在我想知道谁是点击自己的Deep Links。

1 个答案:

答案 0 :(得分:0)

根据Telegram Documentation

当一个人使用/start命令加入僵尸程序时,如果任何其他参数传递给bot-link,则会收到以下格式的消息:

/start PAYLOAD

哪个PAYLOAD代表链接中传递的start参数的值。

例如在telepot库中:

def handle(msg):
    content_type, chat_type, chat_id = telepot.glance(msg)

    if content_type == 'text':
        text = msg['text']
        print('Text:', text)

        if text.startswith('/start'):
            try:
                command, payload = text.split(' ')
                print('Payload:', payload)
                print('chat_id:', chat_id)