Skip to content

Commit

Permalink
Added a switch_pm button to try bot in PM
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterGroosha committed Aug 23, 2022
1 parent 10ce5e4 commit 17ffea9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bot/handlers/inline_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ async def inline_mode_handler(query: types.InlineQuery):
message_text=f"My Telegram ID is {html.code(query.from_user.id)}"
)
)
# Do not forget about is_personal parameter! Otherwise all people will see the same ID
await query.answer(results=[result], cache_time=3600, is_personal=True)
# Do not forget about is_personal parameter! Otherwise, all people will see the same ID
await query.answer(
results=[result], cache_time=3600, is_personal=True,
switch_pm_parameter="1", switch_pm_text="Or try me in PM >>>"
)

0 comments on commit 17ffea9

Please sign in to comment.