我已将我的机器人设置为在发送私人消息后发送每条消息,代码:
client.on('message', async (message) => {
if (message.author.bot) return;
if(message.channel.type === 'dm') {
const dmembed = new DiscordJS.MessageEmbed()
.setTitle(`New Mail Colllected!`)
.setThumbnail(message.author.displayAvatarURL({dynamic: true}))
.setColor('BLUE')
.setTimestamp()
.setDescription(`**User:** ${message.author.tag} (\`${message.author.id}\`)\n**Date:** ${require("moment")(Date.now()).format("LLLL")}\n\n**Mail Content:** \`\`\`\n${message.content}\n\`\`\``)
.setFooter(`ID: ${message.author.id}`)
const dmchannel = client.channels.cache.get('851481340696068156')
dmchannel.send(dmembed)
}
})
问题是机器人多次修复房间,我尝试修复它但效果不佳,我很乐意提供帮助