J
J
JewrySoft2020-04-14 15:13:18
Python
JewrySoft, 2020-04-14 15:13:18

How to implement an account for a user?

Hello. I am writing a bot, and I need a personal account for each user there. For example, his account ID and balance. All! I only need this.

**write on pytelegrambotapi**

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur Pokrovsky, 2020-04-14
@JewrySoft

Create a class with 2 fields: id and balance. Next, create a list of objects of this class, and let's say when the user enters "Top up 5000", you find it in the list, add 5000 to the balance.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question