mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
fix(nachtischsatan-bot): sleep for up to 4 seconds
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
{ token, writers, python3Packages, ... }:
|
||||
writers.writePython3 "nachtischsatan-bot" { libraries = [ python3Packages.python-telegram-bot ]; } ''
|
||||
import random
|
||||
import time
|
||||
|
||||
from telegram.ext import Updater, MessageHandler
|
||||
from telegram.ext.filters import Filters
|
||||
|
||||
|
||||
def flubber(bot, update):
|
||||
time.sleep(random.randrange(4000) / 1000)
|
||||
update.message.reply_text("*flubberflubber*")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user