Browse Source

Add info about mensa and day

master
Schneider 7 years ago
parent
commit
3a23fd2044
  1. 2
      bot.py

2
bot.py

@ -55,6 +55,8 @@ async def mensa(which="zentral"):
with urllib.request.urlopen("https://mensa.schneider-hosting.de/static/%s.%d.json" % (MENSA_URL[which], today)) as url: with urllib.request.urlopen("https://mensa.schneider-hosting.de/static/%s.%d.json" % (MENSA_URL[which], today)) as url:
data = json.loads(url.read().decode()) data = json.loads(url.read().decode())
BOT.say("Das Essen für %s in der %s" % (data["date"], MENSA_NAME[which]))
message = "" message = ""
for meal in data["meals"]: for meal in data["meals"]:
meal_line = "**%s**\n" % meal["category"] meal_line = "**%s**\n" % meal["category"]

Loading…
Cancel
Save