N
N
nintendolyub2020-09-29 20:24:32
Python
nintendolyub, 2020-09-29 20:24:32

What is the problem with the general collection?

I want it to display not only the text, but also the video / image / song, if one is attached, it does not show an error, here is the code:

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

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question