Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @bot.on.chat_invite()
- async def invite(message: Message):
- dialog_filename = f"{dir_to_txt}{message.peer_id}.txt"
- picture_filename = f"{dir_to_pic}{message.peer_id}.txt"
- pattern = [[{"text":"Добавить в чат", "payload":{"type": "open_app", "app_id": 6441755, "owner_id": -200925480, "hash": "anything_data_100500"}}]]
- keyboard = keyboard_gen(
- [
- [{"text": "Добавить в чат", "color": "negative"}]
- [{"type": "open_app", "app_id": 6441755, "owner_id": -200925480, "hash": "anything_data_100500"}]
- ],
- inline=True
- )
- if not os.path.exists(dialog_filename):
- open(dialog_filename, "w").close()
- if not os.path.exists(picture_filename):
- open(picture_filename, "w").close()
- await message(hello_message, keyboard=keyboard)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement