mirror of
https://github.com/kmein/niveum
synced 2026-03-17 10:41:06 +01:00
24 lines
560 B
Nix
24 lines
560 B
Nix
{ 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*")
|
|
|
|
|
|
updater = Updater(
|
|
'${token}'
|
|
)
|
|
|
|
updater.dispatcher.add_handler(MessageHandler(Filters.all, flubber))
|
|
|
|
updater.start_polling()
|
|
updater.idle()
|
|
''
|