From b95de25cc8307906615c304101e29783c724d888 Mon Sep 17 00:00:00 2001 From: Davte Date: Fri, 19 Jul 2019 17:29:55 +0200 Subject: [PATCH] Comments --- ciclopibot/ciclopi.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ciclopibot/ciclopi.py b/ciclopibot/ciclopi.py index cdb6110..35bf947 100644 --- a/ciclopibot/ciclopi.py +++ b/ciclopibot/ciclopi.py @@ -583,12 +583,15 @@ async def set_ciclopi_location(bot, update, user_record): async def cancel_ciclopi_location(bot, update, user_record): """Handle the situation in which a user does not send location on request. - This function is set as custom_parser when the bot requests user's location - and is removed if user does. If not, return a proper message. + This function is set as individual text message handler when the bot + requests user's location and is removed if user does send one. + If not, return a proper message. """ text = get_cleaned_text(bot=bot, update=update) + # If user cancels operation, confirm that it was cancelled if text.lower() == 'annulla': return "Operazione annullata." + # If user writes something else, remind them how to set position later return ( "Non ho capito la tua posizione. Fai /ciclopi > Ordina... > " "Posizione 🧭 per riprovare."