class dg_commands {
constructor(token,peer_id) {
this.vk = new VK({
token: token, // Token group
});
this.peer_id = peer_id;
this.group_id = -xxxxxxxx
};
async send(text) {
var res = await this.vk.api.messages.send({
peer_id: this.peer_id,
message: text
});
return res
};
async full(){
setTimeout(this.send, 1000,'text'); // not working
this.send('text'); // work
};
};