diff --git a/.gitignore b/.gitignore index af2f537..3cae99b 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,4 @@ venv.bak/ # mypy .mypy_cache/ +.*swp diff --git a/bot.py b/bot.py index 84588e7..d5b48f5 100755 --- a/bot.py +++ b/bot.py @@ -7,6 +7,7 @@ import datetime import urllib.request import json import logging +import random import discord from discord.ext import commands @@ -26,6 +27,9 @@ MENSA_NAME = { "turm": "Turmmensa" } +with open("stoll.txt", "r") as tmp_file: + STOLL = tmp_file.readlines() + @BOT.event async def on_ready(): """ On ready """ @@ -78,7 +82,8 @@ async def mensa(which="zentral"): @BOT.command() async def magie(): """MAGIEEEEEE""" - await BOT.say("Magie ist Physik durch wollen!") + rand = random.SystemRandom() + await BOT.say(STOLL[rand.randrange(0, len(STOLL), 1)]) def main(): """ entry point """ diff --git a/stoll.txt b/stoll.txt new file mode 100644 index 0000000..3789f1d --- /dev/null +++ b/stoll.txt @@ -0,0 +1,13 @@ +Magie ist Physik durch wollen! +Wer hat Warsteiner bestellt? +Das ist die wahre Physik. +Die Sonne ist kalt. +Ein IQ geringer als eine Dill-Gurke. +Völlig Unvollkommen, da kommt Murks heraus! +Kraft ist Masse mal Beschleunigung. +Ne, Internet ist scheiße. Da gehe ich nicht rein. +Alles ist vorhersehbar. +Da staunt ihr, was? +Da muss man anzapfen, entsprechend einem Implosionsstrudel. +Sie müssen schon Ihren Kopf jetzt zum Denken benutzen und nicht als Hutständer. +Nicht umsonst ist eines meiner Bücher ein Bestseller.