0

I'm just working on my bot with Telepot. The bot works well but I have a question for you. Is there any way to send a message to the bot and have an answer? Let me show

this is the behaviour I want, but i know it's not correct

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

Okay,the problem is here, so in this case I've just asked for a link but if I do

link = command

I have the old command "/gen".

So, at least, this is what i want to develop in my bot:

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) :)
Giuseppe
  • 3
  • 8
  • so first of You check if `command == "/gen"` meaning if this evals to True that `command = /"gen"` meaning doing this: `link = command` is the same as this: `link = command = "/gen"` or this: `link = "/gen"` why do You expect `command` to change its value? – Matiiss Jul 12 '21 at 08:21
  • yeah, it was an example, i need to find the solution to this problem. After I've checked whether is true, i cannot receive another message, it seems – Giuseppe Jul 12 '21 at 08:25
  • what do You mean You cannot receive another message? just add the function to do that, otherwise I don't know what You want – Matiiss Jul 12 '21 at 08:27

0 Answers0