Answer the question
In order to leave comments, you need to log in
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:
The bot forwards my message to the admin:
Answer the question
In order to leave comments, you need to log in
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 questionAsk a Question
731 491 924 answers to any question