“Commande de rapport Discord” Réponses codées

Commande de rapport Discord

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

Commande de rapport Discord

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;
    };
});
EXATUBE™

Réponses similaires à “Commande de rapport Discord”

Questions similaires à “Commande de rapport Discord”

Plus de réponses similaires à “Commande de rapport Discord” dans JavaScript

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code