Discord.js将使用的命令内容发送给admin



我不是100%确定如何做到这一点,或者如果它是可能的,但是否有一种方法,用户可以做到

#command issue here

并将问题发送到特定的通道或管理员?

所以它基本上是一种向bot管理员报告问题的方法

我很感激你的帮助,并提前感谢

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");
};
}
} 

可以,

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);

最新更新