Answer the question
In order to leave comments, you need to log in
How to add one point to a variable every 100 messages?
Hello, I would like to make some kind of "reward system" for an asset in a conversation. So that for example every 100 messages one number is added to the "points" variable.
I'm not interested in the message count, but how to do something every 100 messages.
Here is the script that counts the messages:
if event.type == VkBotEventType.MESSAGE_NEW:
messages = messages + 1
Answer the question
In order to leave comments, you need to log in
for event in longpoll.listen():
if event.type == VkBotEventType.MESSAGE_NEW:
for a in range(0, 100):
if a >= 100:
#Действие
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question