C
C
CHROME0012021-08-05 19:37:32
Node.js
CHROME001, 2021-08-05 19:37:32

How to make it so that with the tag of a person (Well, when you use the User command), I would show his info, and not delete the message?

Like I write !user @Usertag and it gets deleted right away...

module.exports = {
  name: "userinfo",
  aliases: ["ui"],
  description: "Show User Information!",
  usage: "Userinfo <Mention User>",
  run: async (client, message, args) => {

    //Start
    message.delete();
    let member = message.mentions.users.first() || message.member;

    const statuses = {
      online: "Online",
      dnd: "Do Not Disturb",
      idle: "Idle",
      offline: "Offline/Invisible"
    };

    const embed = new MessageEmbed()
      .setTitle(member.user.username + " Информация")
      .setColor(Color)
      .setThumbnail(member.user.displayAvatarURL())
      .addField("Имя", member.user.tag, true)
      .addField("ID", `${member.id}`, true)
      .addField("Статус", statuses[member.presence.status], true)
      .addField(
        `Роли`,
        message.guild.members.cache.get(member.user.id).roles.cache.size ||
          "Нету ролей",
        true
      )
      .addField(`Avatar Url`, `[Link](${member.user.displayAvatarURL()})`, true)
      .addField("Присоединился", member.joinedAt.toDateString())
      .addField("Создан", member.user.createdAt.toDateString())
      .setImage('https://media.discordapp.net/attachments/866235754610819082/872733600691392512/userinfo.gif')
      .setFooter(`От: ${message.author.username}`)
      .setTimestamp();

    message.channel.send(embed);

    //End
  }
};

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question