Ошибка:
File "C:\Users\Audra\Desktop\test\start.py", line 21, in
text = functions.reg_chat(event.message.peer_id, owner_id)
Код:
import vk_api, random
from plugins import system, functions
from vk_api.bot_longpoll import VkBotEventType, VkBotLongPoll
vk, longpoll = system.session()
while True:
for event in longpoll.listen():
if event.type == VkBotEventType.MESSAGE_NEW:
message = event.message.get('text').split()
if functions.check_chat(event.message.get('peer_id')) >= 1:
print('Ок')
else:
if message[0] == '/start':
owner_id = vk.messages.getConversationsById(peer_ids=event.message.peer_id, group_id=193736173)['items'][0]['chat_settings']['owner_id']
text = functions.reg_chat(event.message.peer_id, owner_id)
vk.messages.send(peer_id=event.message.peer_id, message=f'{text}', random_id=random.randint(-1000000, 1000000))
Как исправить данную ошибку?