-1

Using Python telegram bot i created a reminder bot that would get user reminders and store them on a list , and when the users send request to get reminder it would take them from list i thought the Python Telegram Bot Would Automatically make separate list for each user but it did not it just store in one list so now its all mixed up

the code works like this `list = [] messagehandler(update , context): if(message != 'give me reminder'): list.append(message) else: send list '

Abbos Said
  • 1
  • 1
  • 2

1 Answers1

0

You could use a dictionary(hashtable) instead of of a list with the user id for the key and user's reminders in a list for value. when a user makes a request to get the reminders you could call your_dict[user_id] and get the value. Without any code and data samples I can't provide any further assistance, but I hope it helps.

Karl Olufsen
  • 186
  • 1
  • 10