Answer the question
In order to leave comments, you need to log in
How to make a cycle for incoming telebot, qiwi api payments?
There is a telegram bot (Telebot (pyTelegramBotApi)), with QIWI API.
You need to create a loop that will check the incoming payment for qiwi once every 1 hour, with the condition - if the comment to the payment = user ID (current), then print (1).
The bottom line is that the bot reacts to replenishment with a comment in the form of a user ID
P.S. With the while loop, the bot does not respond to commands, only the loop for checking incoming payments works.
I'm new, just started learning, please explain in more detail with:
Answer the question
In order to leave comments, you need to log in
It's pretty simple, loop the timers.
Here's an example:
from threading import Timer
def donat():
print("complete")
t=Timer(60*60, donat)
t.start()
t=Timer(60*60, donat)
t.start()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question