C
C
Chainik02019-12-22 13:55:20
Python
Chainik0, 2019-12-22 13:55:20

A bot that enters the VK conversation via a link, who will tell you how to implement it?

tried it this way

if msg.startswith('/бот зайди'):
    time.sleep(0)
    vk.messages.joinChatByInviteLink(
           user_id=event.chat_id,
           title=msg[4:],
           )

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey, 2019-12-22
@anerev

This method is only for users, not for communities, they can only be invited.

S
sergeyfilippov4, 2019-12-22
@sergeyfilippov4

if msg.startswith('/бот зайди'):
    time.sleep(0)
    link = msg.replace('/бот зайди', '')
    vk.messages.joinChatByInviteLink(
           link = link)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question