MCPcopy Create free account
hub / github.com/eternnoir/pyTelegramBotAPI / set_timer

Function set_timer

examples/timer_bot.py:24–30  ·  view source on GitHub ↗
(message)

Source from the content-addressed store, hash-verified

22
23@bot.message_handler(commands=['set'])
24def set_timer(message):
25 args = message.text.split()
26 if len(args) > 1 and args[1].isdigit():
27 sec = int(args[1])
28 schedule.every(sec).seconds.do(beep, message.chat.id).tag(message.chat.id)
29 else:
30 bot.reply_to(message, 'Usage: /set <seconds>')
31
32
33@bot.message_handler(commands=['unset'])

Callers

nothing calls this directly

Calls 1

reply_toMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…