Advertisement
l1von

sdf

Dec 14th, 2020
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. @bot.on.chat_invite()
  2. async def invite(message: Message):
  3. dialog_filename = f"{dir_to_txt}{message.peer_id}.txt"
  4. picture_filename = f"{dir_to_pic}{message.peer_id}.txt"
  5. pattern = [[{"text":"Добавить в чат", "payload":{"type": "open_app", "app_id": 6441755, "owner_id": -200925480, "hash": "anything_data_100500"}}]]
  6. keyboard = keyboard_gen(pattern, one_time=False, inline=True)
  7. if not os.path.exists(dialog_filename):
  8. open(dialog_filename, "w").close()
  9. if not os.path.exists(picture_filename):
  10. open(picture_filename, "w").close()
  11. await message(hello_message, keyboard=keyboard)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement