Comments
This commit is contained in:
parent
60034cf30b
commit
b95de25cc8
@ -583,12 +583,15 @@ async def set_ciclopi_location(bot, update, user_record):
|
|||||||
async def cancel_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.
|
"""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
|
This function is set as individual text message handler when the bot
|
||||||
and is removed if user does. If not, return a proper message.
|
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)
|
text = get_cleaned_text(bot=bot, update=update)
|
||||||
|
# If user cancels operation, confirm that it was cancelled
|
||||||
if text.lower() == 'annulla':
|
if text.lower() == 'annulla':
|
||||||
return "Operazione annullata."
|
return "Operazione annullata."
|
||||||
|
# If user writes something else, remind them how to set position later
|
||||||
return (
|
return (
|
||||||
"Non ho capito la tua posizione. Fai /ciclopi > Ordina... > "
|
"Non ho capito la tua posizione. Fai /ciclopi > Ordina... > "
|
||||||
"Posizione 🧭 per riprovare."
|
"Posizione 🧭 per riprovare."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user