【问题标题】:Discord.js Send content of used command to adminDiscord.js 将使用命令的内容发送给管理员
【发布时间】:2021-09-04 21:49:29
【问题描述】:

我不能 100% 确定如何执行此操作或是否可行,但是否有用户可以执行的方法

#command issue here

并将问题发送给特定的渠道或管理员?

所以它基本上就像一种向机器人管理员报告问题的方式

提前感谢您的帮助和感谢

module.exports = {
  name: "reportissue",
  description: "Report an issue you are experiencing with the bot",
  permissions: {
    channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
    member: ["ADMINISTRATOR"],
  },
  aliases: ["report", "issue"],
   run: async (client, message, args, { GuildDB }) => {


// I have removed this since its not the correct usage
// message.channel.send("issue");

    };
  }
} 

【问题讨论】:

    标签: discord discord.js


    【解决方案1】:

    是的,这会起作用

    const query = args.join (" ")
    
          if(!query) return message.channel.send("Please specify the bug you want to report")
    
          const reportEmbed = new MessageEmbed()
          .setTitle('Bug!')
          .addField('Author', message.author.toString(), true)
          .addField('Report', query)
          .addField('Guild', message.guild.name, true)
          .setThumbnail(message.author.displayAvatarURL({ dynamic: true }))
          .setTimestamp()
            message.channel.send('We are extremely sorry for this issue. Your report has successfully been submitted and will be looked into. \n Regards, AuraBot Team')
          client.channels.cache.get('id').send(reportEmbed);
    

    【讨论】:

    • @foreverlost 没问题
    猜你喜欢
    • 2021-06-01
    • 2020-06-19
    • 2014-12-08
    • 1970-01-01
    • 2020-10-09
    • 2016-02-27
    • 1970-01-01
    • 2018-11-13
    • 1970-01-01
    相关资源
    最近更新 更多