Hello guys i am currently developing a telegram bot which can set reminders. However, i am facing a lot of errors while doing this task. The coding that i used:
update.message.reply_text("What should i remind you about?")
remind = update.message.text
update.message.reply_text("Enter Hours")
alarmHour = int(update.message.text)
update.message.reply_text("Enter Minutes")
alarmMin = int(update.message.text)
update.message.reply_text("am / pm: ")
AP = str(update.message.text)
if AP == "pm":
alarmHour += 12
while True:
if alarmHour == datetime.datetime.now().hour and alarmMin == datetime.datetime.now().minute:
update.message.reply_text(remind)
break
The errors i faced: caused error invalid literal for int() with base 10: '/reminder'
I also realised that we couldnt ask for more than one input from users in the same command. Do any of you guys know how to solve this problem?
use ConversationHandler instead of update message because update message method is not wait for user message