我正在为吸收成员创建一个机器人。这样的机器人行动: 我发送一个唯一的链接到我的机器人用户,然后用户发送自己的唯一链接到其他。通过这种方式其他吸收到我的机器人。 我为机器人创建了一个Deep Link,现在我想知道谁是点击自己的Deep Links。
答案 0 :(得分:0)
当一个人使用/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)