K
K
kh0dan2022-02-11 15:52:16
Node.js
kh0dan, 2022-02-11 15:52:16

Forwarding VK messages?

Hello. I got a problem.
I am writing a vk-io javascript helper bot for the VKontakte group.
I need to make a user's message forward to another user (group admin) on behalf of the community.
Example:
I write to a bot:
SeHtoMj.png

The bot forwards my message to the admin:
3e6MZHT.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stas Ostrovsky, 2022-02-12
@Ostrovsky_Miroslav

Good evening, have you tried to look at VKontakte methods ?.
cjs:
const {VK}=require("vk-io"); //
const const vk = new VK({ token:"",pollingGroupId: groupid, apiMode: "mode, can be found in the documentation"}); //const.
const {
updates
} = vk;
vk.updates.start() //on the old lib vk.updates.startPolling();
async function getMessage() { //create a function.
await vk.api.call("message.send", { user_id: id users, message: "text"}); //call
await method vk.api.messages.send({ user_id: id users, message: "text"}); //second way to call the method.
return true; //output a positive response, or rather true. //optional.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question