L
L
leonardo_malbro2021-05-14 12:46:31
htaccess
leonardo_malbro, 2021-05-14 12:46:31

How to make it so that the bot sends a report not to PM, but to a special conversation?

cmd.on(/^(?:репорт|report|rep|жалоба|вопрос)\s?([^]+)?/i, async (message, args, bot) => { 
 		if(message.chat) return message.send(`Обращаться в репорт можно только в ЛС ${config.group_url}`);
    if(!message.args[1]) return message.send(` » вы не написали жалобу | репорт [текст]`);

    for(i=0;i<25000;i++){
      if(users[i]){
      if(users[i].right >= 4){ 
        vk.api.call("messages.send", {
          peer_id: users[i].id,
          message: ` Поступил новый репорт!\n-----------------\n » ID игрока: ${message.user.uid}\n » Жалоба: ${message.args[1]}\n✒ » Для ответа: [ID] [TEXT]`
        }).then((res) => {}).catch((error) => {console.log('report error'); });	
      }
    }
    }
    return message.send(` » Вы успешно отправили жалобу.`);
  });

Here is a screenshot of the chat id609e46d48f9d1280797784.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2018-11-19
@kursof1

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/awstats$
RewriteRule . /index.php [L]
</IfModule>

M
MrBodyJs, 2021-05-14
@MrBodyJs

vk.api.call("messages.send", {
chat_id: 220,
message: `...`
})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question