F
F
falsescam2020-08-10 02:54:10
API
falsescam, 2020-08-10 02:54:10

Why does it give an error Code №10 - Internal server error when mentioning everyone?

In general, there is such a code

vk.updates.hear(/-send/, async (ctx) => {
  if(admin.indexOf(ctx.senderId) === -1) {
    return;
  }
  const response = await vk.api.messages.getChat({
    chat_id: 5
  })
  let users = [];

  for(let i = 2; i < response.members_count; i++) {
    users[i] = '@id' + response.users[i] + '(&#13;)';
  }
  let text = users.map(x => x).join(' ');
  /*const response2 = await vk.api.messages.send({
    message: text,
    peer_id: ctx.peerId
  })*/
  ctx.reply(text)
  
});


Gives a Code #10 - Internal server error and does not send a message. Why?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Tim, 2020-08-10
@Tim-A-2020

5f30b5e28ec78975146351.jpeg

A
AntiRaidBot, 2020-08-10
@AntiRaidBot

It is possible that there are too many mentions in the message (maximum 50 per message)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question