📅  最后修改于: 2022-03-11 14:59:23.307000             🧑  作者: Mango
client.on('message', message => {
let args = message.content.substring(PREFIX.length).split(' ');
switch(args[0]){
case 'report':
message.delete({timeout: 3000});
let target = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
if(!target) return message.channel.send('Ù
Ù ÙضÙÙ Ù
Ø´Ù٠اÙعض٠أÙÙا!').then(m => m.delete({timeout: 15000}));
let reason = args.slice(2).join(" ");
if(!reason) return message.channel.send(`Ù
Ù ÙضÙÙ Øدد Ùد٠اÙإبÙاغ **${message.author.username}**`).then(m => m.delete({timeout: 15000}));
let reportChannel = message.guild.channels.cache.find(x => x.name === "report");
const embed = new Discord.MessageEmbed()
.setTitle("ابÙاغ جدÙد")
.addField("اÙعضÙ", `${target.user.username}`)
.addField("اÙسبب", `${reason}`)
.addField("اسÙ
اÙÙ
بÙغ", `${message.author.username}`)
.addField("اÙد٠اÙÙ
بÙغ", `${message.author.id}`)
.setFooter("ابÙاغ جدÙد")
message.channel.send('تÙ
Ø¥Ùصا٠إبÙاغ٠بÙØ¬Ø§Ø Ø´Ùرا Ù٠عÙ٠اÙإبÙاغ').then(m => m.delete({timeout: 15000}));
reportChannel.send(embed);
break;
};
});