我只是在使用 Telepot 开发我的机器人。该机器人运行良好,但我有一个问题要问你。有没有办法向机器人发送消息并得到答案?让我展示
这是我想要的行为,但我知道这是不正确的
if command == "/gen":
bot.sendMessage(chat_id, "Please send me your link")
link = command #message sent after the request ("please send me link")
sale = generate(link) #generate is my function which creates amazon sales
好的,问题就在这里,所以在这种情况下,我只是要求提供链接,但如果我这样做
link = command
我有旧命令“/gen”。
所以,至少,这是我想在我的机器人中开发的:
user : "/start"
bot: "Hi send me your link"
user: "www.amazon.com" #general product in this case)
bot: "this is your sale -> (message with links and photos) :)