From f57e515f67f1db0c2066d61dbfe4a1d5350abfcc Mon Sep 17 00:00:00 2001 From: Antonio De Lucreziis Date: Wed, 26 Jul 2023 18:11:20 +0200 Subject: [PATCH] fix: aggiustato un bug di /stop --- bot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 02a6b27..882415c 100644 --- a/bot.py +++ b/bot.py @@ -185,7 +185,10 @@ def conversazione(func): @bot.message_handler(commands=["stop"]) def handle_stop(message): - del registro_conversazioni[message.chat.id] + if message.chat.id in registro_conversazioni: + del registro_conversazioni[message.chat.id] + else: + bot.send_message(message.chat.id, "Boh in realtà stop non serve, non stavi facendo niente") @bot.message_handler(commands=["nuova_proposta"])