N
N
nintendolyub2020-09-24 19:27:07
Python
nintendolyub, 2020-09-24 19:27:07

What is wrong in the general collection of vk api?

if event.obj.text == 'общий сбор':
            if event.from_chat:
                vk.messages.send(
                        peer_id=event.obj.peer_id,
                        random_id=get_random_id(),
                        chat_id=event.chat_id,
                        message="@all" + event.obj.text.split('общий сбор'))

sobsna what's the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
drikor, 2020-09-25
@drikor

Remove the peer_id, since the total collection cannot be in PM. You also for some reason separated the "@all" part of the message from the "total collection"

if event.obj.text == 'общий сбор':
            if event.from_chat:
                vk.messages.send(
                        chat_id=event.chat_id
                        random_id=0,
                        message="@all общий сбор")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question