|
|
@ -152,10 +152,9 @@ def mensa(bot, update, args): |
|
|
|
today += 1 |
|
|
|
|
|
|
|
today = today % 7 |
|
|
|
|
|
|
|
for arg in args: |
|
|
|
if arg in MENSA_NAME: |
|
|
|
which = args[0] |
|
|
|
which = arg |
|
|
|
elif arg in MODES: |
|
|
|
filter_categories = MODES[arg] |
|
|
|
elif arg in WEEKDAYS: |
|
|
@ -165,7 +164,9 @@ def mensa(bot, update, args): |
|
|
|
else: |
|
|
|
update.message.reply_text("Falscher Aufruf! RTFM und versuchs nochmal.") |
|
|
|
return |
|
|
|
|
|
|
|
if today == 0: |
|
|
|
update.message.reply_text("Sonntags hat die Mensa zu") |
|
|
|
return |
|
|
|
url = "https://mensa.schneider-hosting.de/static/%s.%d.json" % (MENSA_URL[which], today) |
|
|
|
request = requests.get(url) |
|
|
|
request.encoding = 'utf-8' |
|
|
|