def commandsFromButtons(cls): file_str = open(ConfigLoader.getKeyboard(), "r", encoding="UTF-8").read() data = json.loads(file_str) for button in data['buttons'][0]: cls.m_command_map[button['action'] ['label']] = button['action']['payload']
def send_msg(self, send_id, message): return self.vk_api.messages.send(peer_id=send_id, message=message, random_id=random.randint(0, 2048), keyboard=open( ConfigLoader.getKeyboard(), "r", encoding="UTF-8").read())