fix: map location wrong decorator is pass

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
yihong0618 2023-12-18 12:21:35 +08:00
parent 6e0ae560f9
commit d58575b428

View File

@ -44,6 +44,9 @@ def wrap_handler(handler: T, bot: TeleBot) -> T:
m = message.caption = extract_prompt(
message.caption, bot.get_me().username
)
elif message.location and message.location.latitude is not None:
# for location map handler just return
return handler(message, *args, **kwargs)
if not m:
bot.reply_to(message, "Please provide info after start words.")
return