Advertisement
l1von

sdfds

Dec 14th, 2020
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 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(
  7. [
  8. [{"text": "Добавить в чат", "color": "negative"}]
  9. [{"type": "open_app", "app_id": 6441755, "owner_id": -200925480, "hash": "anything_data_100500"}]
  10. ],
  11. inline=True
  12. )
  13. if not os.path.exists(dialog_filename):
  14. open(dialog_filename, "w").close()
  15. if not os.path.exists(picture_filename):
  16. open(picture_filename, "w").close()
  17. await message(hello_message, keyboard=keyboard)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement