N
N
NoXXik2020-03-11 21:17:24
Python
NoXXik, 2020-03-11 21:17:24

How to install vk_api.bot_longpoll?

I am making a bot for VK using vk_api. I found the code where import is written

from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType
import vk_api


But I do not have this module, pycharm shows that they are not there, although vk_api is available. I looked on YouTube, it works for people. How to solve this problem. You definitely need LongPoll. Prescribed pip install vk_api.bot_longpoll does not find anything. Thanks in advance)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Danil K., 2020-03-19
@Danya_Violet

from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType

vk_session = vk_api.VkApi(token=constant.token)
vk = vk_session.get_api()
longpoll = VkBotLongPoll(vk_session, constant.group_id)

# Обработка событий ВК
for event in longpoll.listen():
    # Начало беседы
    if event.obj.text == 'Начать':
...

I
Ilya Timofeev, 2020-06-01
@tim_2007

It's very good that you work in pycharm. One good thing I found is that you can install any python module on any version. You do ctrl+alt+s and
select project:<project_name>, there you select project interpreter
, double-click on the latest version of any module
using the search, you find vk_api
INSTALL VERSION 10.1 (required)
After successful installation, you can update.
I myself faced this problem, I suffered for about a month, I'm glad to help

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question