diff --git a/src/commands.py b/src/commands.py index a5b7f2a..f3d4ca6 100644 --- a/src/commands.py +++ b/src/commands.py @@ -1,4 +1,5 @@ import re +from datetime import datetime from io import BytesIO from telegram import Bot, Update @@ -71,6 +72,13 @@ def ls(update: Update, context: CallbackContext): msg += name + ' ' * (18 - len(name)) + requests[name]['url'] + '\n' msg += '```' + if user in scheduler.storage: + msg += '\n*Enabled requests:* \n```\n' + for name in scheduler.storage[user]: + cache: CacheEntry = scheduler.storage[user][name] + msg += cache.name + ' ' * (18 - len(name)) + datetime.fromtimestamp(cache.time).strftime('%b %d %Y %H:%M:%S') + '\n' + msg += '```' + return msg