UNICT-DMI / Telegram-DMI-Bot

A telegram bot for the DMI students 🎓 (@DMI_Bot)
https://t.me/DMI_Bot
GNU General Public License v3.0
41 stars 30 forks source link

Error with easter egg function #86

Closed boozec closed 4 years ago

boozec commented 4 years ago

I found an error on this page https://github.com/UNICT-DMI/Telegram-DMI-Bot/blob/master/module/easter_egg_func.py#L16 In short:

# ....
def santino(update: Update, context: CallbackContext):
    chat_id = update.message.chat_id
    if (chat_id == -1001031103640 or chat_id == config_map['dev_group_chatid']):
        #....

The dictionary config_map is not imported. This raise an exception when an user calls /santino. Meanwhile, I'd like to write the easter eggs function better, using the choice function instead of get a random integer and then check it with if-elif-else statement.