if (message.content.startsWith(`${guildPrefix}userinfo`)) { var users = message.mentions.users.first(); if (!message.content.includes(users)) { const uEmbed = new Discord.MessageEmbed() .setColor(`RANDOM`) .setAuthor(`Userinfo for ${message.author.tag}!`,"https://cdn.discordapp.com/avatars/"+message.author.id+"/"+message.author.avatar+".gif") .setDescription(`\`\`\`yml Username: ${message.author.username} \\\\ Tag: #${message.author.discriminator} Bot: ${message.author.bot} \\\\ Creation Date: ${message.author.createdAt} Nickname: ${message.author.nickname} \\\\ Typing Duration in this channel: ${message.author.typingDurationIn(message.channel)}s \\\\ Flags: ${message.author.flags.toArray()} Avatar URL: cdn.discordapp.com/avatars/${message.author.id}/${message.author.avatar}.gif\`\`\` `) message.channel.send(uEmbed) } else { var users = message.mentions.users.first(); console.log(users) const uEmbed = new Discord.MessageEmbed() .setColor(`RANDOM`) .setAuthor(`Userinfo for ${users.tag}!`,"https://cdn.discordapp.com/avatars/"+users.id+"/"+users.avatar+".gif") .setDescription(`\`\`\`yml Username: ${users.username} \\\\ Tag: #${users.discriminator} Bot: ${users.bot} \\\\ Creation Date: ${users.createdAt} Nickname: ${users.nickname} \\\\ Typing Duration in this channel: ${users.typingDurationIn(message.channel)}s \\\\ Flags: ${users.flags.toArray()} Avatar URL: cdn.discordapp.com/avatars/${users.id}/${users.avatar}.gif\`\`\` `) message.channel.send(uEmbed) } }