S
S
Sa_bro02021-11-28 20:18:07
Python
Sa_bro0, 2021-11-28 20:18:07

How to write code in Python for my task?

I am writing a bot, and I have a problem: I can’t write code to forward a user’s message to another user, an administrator, for example
Here is my code: https://pastebin.com/rCP1rQDb ,

I need the user to write when clicking the "Error" button text and this text was sent to the administrator.

Please help, I googled, studied, and did not understand anything. It remains only to do this and my school project is ready)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-11-28
@Vindicar

Read the official examples , it's there.

await bot.api.messages.send(
            peer_id=event.object.user_id, message="Спасибо за подписку!", random_id=0
        )

We can assume that peer_id is the id of the user to send the message to.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question