Answer the question
In order to leave comments, you need to log in
How to use command only once VK Api python?
However hello! I've been racking my brains for about 5-7 hours, I can't figure out how to make the command be used only once, since I'm implementing a game bot (Not on VkLongPoll). In general, I wanted to add promotional codes, everything seems to work, the balance is counted, but there is just this nuance, this command can be used many times.
I use these libraries:
DB - Sq3lite, random, datatime, vk_api.
If you need a piece of code, I'll throw it off.
PS Since this is the case, tell me how to check id. Just my average knowledge is not enough
Answer the question
In order to leave comments, you need to log in
In the database, create a field where you save the promo code, upon activation, check whether the user has a promo code, if so, reject it, if not, accept and add the promo code to the field.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question