📜  建议 discord.js - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:55.783000             🧑  作者: Mango

代码示例2
client.on("message", exa => {
  var channel = exa.channel.id === `ايدي الروم`;
  if (!channel) return false;
  let sugexa = exa.content
    .split(" ")
    .slice("")
    .join(" ");
  if (exa.author.bot) return;
  if (exa.content.startsWith("")) {
    exa.delete();
    var embed = new Discord.MessageEmbed()
      .setAuthor(exa.author.username)
      .setTitle("**Suggestion !!**")
      .setThumbnail(exa.author.displayAvatarURL({ dynamic: true }))
      .setColor("#0083ff")
      .setDescription(
        `●▬▬▬▬▬▬●
  ${sugexa}
  ●▬▬▬▬▬▬●`
      )
      .setFooter(`${exa.author.tag}`, `${exa.author.avatarURL()}`);
    exa.channel.send(embed).then(exa => {
      exa.react(":white_check_mark:");
      exa.react(":negative_squared_cross_mark:");
    });
  }
});