Browse Source

mensa fix (still closed :()

master
angerstoner 4 years ago
parent
commit
7724ea9dc6
  1. 7
      mensa.py

7
mensa.py

@ -72,10 +72,11 @@ MODES = {
def linux_mensa(update: Update, context: CallbackContext): def linux_mensa(update: Update, context: CallbackContext):
mensa(update, context, ["linux"])
context.args = ["linux"]
mensa(update, context)
def mensa(update: Update, context: CallbackContext, args: list[str]):
def mensa(update: Update, context: CallbackContext):
if update.message.chat_id in DISABLED_GROUPS: if update.message.chat_id in DISABLED_GROUPS:
return return
which = "zentral" which = "zentral"
@ -84,7 +85,7 @@ def mensa(update: Update, context: CallbackContext, args: list[str]):
auto_next_day = True auto_next_day = True
today = datetime.datetime.now().date() today = datetime.datetime.now().date()
for arg in args:
for arg in context.args:
arg = arg.lower() arg = arg.lower()
if arg in MENSA_NAME: if arg in MENSA_NAME:
which = arg which = arg

Loading…
Cancel
Save