1
0
mirror of https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot.git synced 2025-07-25 07:31:48 +00:00
This commit is contained in:
2021-11-06 13:00:00 -07:00
parent c34af4cd40
commit f67cb398ac
2 changed files with 15 additions and 5 deletions

13
bot.py
View File

@@ -85,14 +85,17 @@ def license(update: Update, context: CallbackContext):
def status(update: Update, context: CallbackContext):
"""Gather status of bot and dependant services and return important status updates."""
warning(f"Status command ran by {update.message.chat.username}")
bot_resp = datetime.datetime.now(update.message.date.tzinfo) - update.message.date
bot_resp_time = (
datetime.datetime.now(update.message.date.tzinfo) - update.message.date
)
bot_status = s.status(
f"It took {bot_resp_time.total_seconds()} seconds for the bot to get your message."
)
update.message.reply_text(
text=s.status(
f"It took {bot_resp.total_seconds()} seconds for the bot to get your message."
),
text=bot_status,
parse_mode=telegram.ParseMode.MARKDOWN,
disable_notification=True,
)