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"
- 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)
- ОШИБКА:
- [VKBottle] While parent_processor was handling error occurred
- Traceback (most recent call last):
- File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\vkbottle\framework\framework\swear_handler.py", line 26, in wrapper
- return await func(*args, **kwargs)
- File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\vkbottle\framework\bot\processor.py", line 35, in parent_processor
- return await self.message_processor(obj, client_info)
- File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\vkbottle\framework\bot\processor.py", line 81, in message_processor
- task = await rules[0].call(*args, **kwargs)
- File "main.py", line 93, in invite
- await message(hello_message, keyboard=keyboard)
- File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\vkbottle\types\message.py", line 93, in __call__
- **self.get_params(locals()), peer_id=self.peer_id,
- File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\vkbottle\types\methods\messages.py", line 1110, in __call__
- "messages.send", params, response_model=responses.messages.SendModel
- File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\vkbottle\api\api\request.py", line 31, in __call__
- error_handler=self.error_handler,
- File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\vkbottle\api\api\util\requester.py", line 68, in request
- return await error_handler.handle_error(exception)
- File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\vkbottle\api\api\error_handler\error_handler.py", line 28, in handle_error
- return await self.unhandled_error(e)
- File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\vkbottle\api\api\error_handler\error_handler.py", line 58, in unhandled_error
- raise e
- vkbottle.utils.exceptions.VKError: (911, 'Keyboard format is invalid: button [1][0] label is required', <Method MessagesSend>, {'random_id': -129278274, 'peer_id': 2000000048, 'message': 'дарова я нейробред\nя рандомно высираю демотиваторы, беру ваши сообщения и картинки, которые вы отправляете\nотвечаю на @neurobred или дем или d или / если выдана переписка\nне забудьте выдать доступ к переписке или админку, а то бот будет игнорить\n"помощь" - команды бота\nF.A.Q - https://vk.com/@neurobred-faq\n', 'keyboard': '{"one_time":false,"buttons":[[{"action":{"type":"text","label":"\\u0414\\u043e\\u0431\\u0430\\u0432\\u0438\\u0442\\u044c \\u0432 \\u0447\\u0430\\u0442"},"color":"negative"}],[{"action":{"type":"open_app","app_id":6441755,"owner_id":-200925480,"hash":"anything_data_100500"}}]],"inline":true}'})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement