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"])