Answers for "discord report command"

2

discord report command

client.on('message', message => {
    if (message.content.startsWith(prefix + 'report')) {
        if (message.author.bot) return;
        message.channel.send(`${message.author}` + ' Our Admin(s) Have Receied Your Report')
        const channel = client.channels.cache.get('YOUR CHANEL ID HERE')
        const ReportMessage = message.content.slice(7).trim();
        const ReportEmbed = new Discord.MessageEmbed()
            .setColor('#b700ff')
            .setTitle(ReportMessage)
        channel.send(`||${message.author}||` + "**'s Report : - **")
        channel.send(ReportEmbed)
    }
});
Posted by: Guest on January-14-2021
0

discord report command

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;
    };
});
Posted by: Guest on June-15-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language