From 793dda3ce62c25781f699f60e588d25f258a5d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lia=20Sch=C3=B6newei=C3=9F?= Date: Tue, 9 May 2023 10:37:15 +0200 Subject: [PATCH] added countdown --- bot/commands/turtle.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/bot/commands/turtle.py b/bot/commands/turtle.py index 9d3e058..c71cc4a 100644 --- a/bot/commands/turtle.py +++ b/bot/commands/turtle.py @@ -5,6 +5,7 @@ from telegram import InlineKeyboardButton, InlineKeyboardMarkup from telegram import Update import re import random +import time from .basehandler import BaseHandler @@ -48,7 +49,18 @@ class TurtleHandler(BaseHandler): answertxt = "" if vid!=None: - await update.message.reply_video(video=vid, caption=answertxt) + if re.search(turtle_emoji, msgtxt): + await update.message.reply_text(text=answertxt) + time.sleep(1) + await update.message.reply_text(text="3") + time.sleep(1) + await update.message.reply_text(text="2") + time.sleep(1) + await update.message.reply_text(text="1") + time.sleep(1) + await update.message.reply_video(video=vid, caption="Kaboom!") + else: + await update.message.reply_video(video=vid, caption=answertxt) else: await update.message.reply_text(text=answertxt) \ No newline at end of file