Answer the question
In order to leave comments, you need to log in
Why is my VK bot (group) not working (vk_api, python)?
Hello! It is necessary to make the bot send me at least some message, and the python script does not even want to work (I'm trying to log in as a group) ....
Question: Why?
Here is the code:
import time
import vk_api
vk = vk_api.VkApi(token = 'СКРЫТ В ЦЕЛЯХ БЕЗОПАСНОСТИ')
vk_api = vk.get_api()
LongPoll = vk_api.VkBotLongPoll(vk, 161827083, wait=20)
vk.auth()
Traceback (most recent call last): File "/home/cheater/Документы/2pb.py", line 9, in <module> LongPoll = vk_api.VkBotLongPoll(vk, 161827083, wait=20) TypeError: __call__() takes exactly 1 argument (4 given) [Finished in 0.2s]
Answer the question
In order to leave comments, you need to log in
Read the text of the exception.
The VkBotLongPoll method takes only 1 argument (and that is the current object itself), and for some reason you pass 4 to it.
And in general, the vk_api object does not have such a VkBotLongPoll method. You must have messed something up.
I recommend using vk instead of the vk_api library.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question