mirror of
https://github.com/andwati/travel-inspo.git
synced 2026-10-18 02:02:52 +00:00
show the keyboard after selection
This commit is contained in:
+1
-1
@@ -48,7 +48,7 @@ def get_destination_info(destination: str) -> dict[str, str] | None:
|
||||
Fetches a summary and URL for a given destination from Wikipedia.
|
||||
"""
|
||||
wiki_wiki = wikipediaapi.Wikipedia(
|
||||
user_agent="TravelInspoBot/1.0 ([email protected])",
|
||||
user_agent="TravelInspoBot/1.0 (https://github.com/andwatiian/travel-inspo; [email protected]) wikipediaapi/0.6.0",
|
||||
language="en",
|
||||
)
|
||||
page = wiki_wiki.page(destination)
|
||||
|
||||
@@ -80,3 +80,18 @@ async def button(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
|
||||
chat_id=query.message.chat.id, # type: ignore
|
||||
text="Sorry, I couldn't find information for that destination.",
|
||||
)
|
||||
|
||||
# Show the keyboard again for further inspiration
|
||||
keyboard = [
|
||||
[InlineKeyboardButton("Beaches 🏖️", callback_data="beaches")],
|
||||
[InlineKeyboardButton("Mountains 🏔️", callback_data="mountains")],
|
||||
[InlineKeyboardButton("Cities 🏙️", callback_data="cities")],
|
||||
[InlineKeyboardButton("Adventure 🧗", callback_data="adventure")],
|
||||
[InlineKeyboardButton("Ancient Ruins 🏛️", callback_data="ancient ruins")],
|
||||
]
|
||||
reply_markup = InlineKeyboardMarkup(keyboard)
|
||||
await context.bot.send_message(
|
||||
chat_id=query.message.chat.id, # type: ignore
|
||||
text="What kind of adventure would you like to explore next?",
|
||||
reply_markup=reply_markup,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user