最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to make a bot react to its own message? - Stack Overflow

programmeradmin6浏览0评论

So I am trying to make the bot react to it's own message, for a polls feature of my discord server, and I am wondering how to make the bot add reactions to it's message? (Currently, it adds the reaction to the person who executed the .suggestion mand.)

client.on('message', message => {
  if (message.content.startsWith('.suggestion')) {

        const channel = message.guild.channels.find('name', 'polls');
        const args = message.content.slice(12).trim().split(/ +/g);
        let suggestion = args.slice(0).join(" ");
        if (!channel) return;

        let embed = new Discord.RichEmbed()
        .setColor("#55FFFF")
        .setDescription('▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n▬▬▬▬▬▬▬▬▬**«    Vexil Player Suggestion    »**▬▬▬▬▬▬▬▬▬▬\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n\n**Suggested By »** ' + message.author + '\n\n**Suggestion »** ' + suggestion + '\n\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n▬▬▬▬▬▬▬▬▬▬▬▬**«**     @everyone     **»**▬▬▬▬▬▬▬▬▬▬▬▬\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬')
        .setFooter('Vexil', client.user.avatarURL)

    channel.send(embed);
    message.react("
发布评论

评论列表(0)

  1. 暂无评论