diff --git a/EDTcalendar.py b/EDTcalendar.py index f2a473d..06aeb4f 100644 --- a/EDTcalendar.py +++ b/EDTcalendar.py @@ -57,8 +57,8 @@ class Event(ics.Event): def __str__(self): return markdown.text( markdown.bold(f"<{str(self.begin.date())[5:]}>"), - markdown.code(f"\uD83D\uDCD3[{self.name}]:"), - markdown.text(f"\u231A{str(self.begin.time())[:-3]} -> {str(self.end.time())[:-3]}"), - markdown.italic(f"\uD83D\uDCCD{self.location} \uD83D\uDC68\u200D\uD83C\uDFEB{self.organizer}"), + markdown.code(f"📓[{self.name}]:"), + markdown.text(f"⌚{str(self.begin.time())[:-3]} -> {str(self.end.time())[:-3]}"), + markdown.italic(f"📍{self.location} 👨‍🏫{self.organizer}"), sep="\n" - ) # surrogates not allowed + ) diff --git a/Languages/en.json b/Languages/en.json index b5e21c3..a4ddc95 100644 --- a/Languages/en.json +++ b/Languages/en.json @@ -1,6 +1,6 @@ { "welcome": "\uD83D\uDCA0 *Welcome to the TelegramEDT bot !* \uD83D\uDCA0\n\uD83D\uDD39Please use the command /setedt to set your calendar\n\uD83D\uDD39Use /notif to configure events notification\n\u2139And /help for more commands", - "help": "\u2139 *Commands help* \u2139\n\uD83D\uDCC5/edt, show your next events\n\uD83D\uDD14/notif, set your events notifications\n\u2699/setedt, set your calendar", + "help": "\u2139 *Commands help* \u2139\n\uD83D\uDCC5/edt, show your next events\n\uD83D\uDD14/notif, set your events notifications\n\u2699/setedt, set your calendar\n\uD83D\uDCE4\t/getedt to show your ressource", "edt_err_set": "Your EDT is not set ! \u274C\n\u2139Use /setedt to fix that", "edt_err_choice": "Invalid choice ! \u274C\n\u2139You can choose between: `day`, `next`, `week`, `next week`", "setedt_err_res": "Invalid resources ! \u274C", diff --git a/bot.py b/bot.py index 1d609ac..ce753f1 100644 --- a/bot.py +++ b/bot.py @@ -167,7 +167,7 @@ async def notif_cmd(message: types.Message): logger.info(f"{message.from_user.username} do notif command: {message.text}") with dbL: with shelve.open("edt", writeback=True) as db: - if message.text[7:10] == "toggle": + if message.text[7:13] == "toggle": if db[user_id].nt: res = False else: @@ -184,11 +184,11 @@ async def notif_cmd(message: types.Message): msg = lang(db[user_id], "notif_err_num") else: if cut == 11: - db[user_id]["notif"].nt_time = int(message.text[cut+1:]) + db[user_id].nt_time = int(message.text[cut+1:]) else: - db[user_id]["notif"].nt_cooldown = int(message.text[cut + 1:]) + db[user_id].nt_cooldown = int(message.text[cut + 1:]) - msg = lang(db(user_id), "notif_time_cooldown").format(message.text[7:cut], message.text[cut + 1:]) + msg = lang(db[user_id], "notif_time_cooldown").format(message.text[7:cut], message.text[cut + 1:]) elif message.text[7:11] == "info": msg = lang(db[user_id], "notif_info").format(db[user_id].nt, db[user_id].nt_time,