users = {
353218092,
283561951,
452897354,
237810835,
385705916,
414542967
}
# Функция, отвечающая за отправку сообщения
def addUser(chat_id, userid):
vk.method('addChatUser', {
'chat_id': chat_id,
'user_id': userid
})
while True:
response = vk.method('messages.get',
values)
if response['items']:
values['last_message_id'] = response['items'][0]['id']
for item in response['items']:
if response['items'][0]['body'] == '.cтарт':
for x in users:
addUser(item['chat_id'], x)
time.sleep(1)
Ошибка:
Traceback (most recent call last):
File "C:/Users/madwayz1337/PycharmProjects/rektbot/main.py", line 65, in
addUser(item['chat_id'], x)
File "C:/Users/madwayz1337/PycharmProjects/rektbot/main.py", line 53, in addUser
'user_id': userid
File "C:\Users\madwayz1337\AppData\Local\Programs\Python\Python36-32\lib\site-packages\vk_api\vk_api.py", line 600, in method
raise error
vk_api.exceptions.ApiError: [3] Unknown method passed