1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00

feat: nachtischsatan-bot

This commit is contained in:
Kierán Meinhardt
2020-01-29 17:23:21 +01:00
parent 99883608bd
commit 8548ba5b49
2 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
{ token, writers, python3Packages, ... }:
writers.writePython3 "nachtischsatan-bot" { libraries = [ python3Packages.python-telegram-bot ]; } ''
from telegram.ext import Updater, MessageHandler
from telegram.ext.filters import Filters
def flubber(bot, update):
update.message.reply_text("*flubberflubber*")
updater = Updater(
'${token}'
)
updater.dispatcher.add_handler(MessageHandler(Filters.all, flubber))
updater.start_polling()
updater.idle()
''