fix command

This commit is contained in:
rhearmas 2020-01-10 21:08:53 -05:00
parent 4b4fd90599
commit 4ca8b97336

View file

@ -1,10 +1,6 @@
function titleCase(str) { const dateFormat = require('dateformat');
str = str.toLowerCase().split(' ');
for (let i = 0; i < str.length; i++) { dateFormat('dddd, mmmm dS, yyyy, h:MM:ss TT');
str[i] = str[i].charAt(0).toUpperCase() + str[i].slice(1);
}
return str.join(' ');
}
exports.run = async (client, message, args, level) => { exports.run = async (client, message, args, level) => {
let user = message.mentions.users.first() || message.author; let user = message.mentions.users.first() || message.author;
@ -28,8 +24,8 @@ exports.run = async (client, message, args, level) => {
await message.delete(); await message.delete();
message.channel.send({ embed: client.embed( message.channel.send({ embed: client.embed(
`User info: ${target.user.tag}`, `User info: ${member.user.tag}`,
"**This message will be deleted in 60 seconds. :bomb:", "**This message will be deleted in 60 seconds.** :bomb:",
[ [
{ {
name: "= Status =", name: "= Status =",
@ -41,55 +37,43 @@ exports.run = async (client, message, args, level) => {
}, },
{ {
name: "= Nickname =", name: "= Nickname =",
value: target.guildMember.nickname, value: member.nickname || "None"
inline: true
}, },
{ {
name: "= Unique User ID (UUID) =", name: "= Unique User ID (UUID) =",
value: target.user.id, value: member.user.id !== null ? member.user.id : "Unknown"
inline: true
},
{
name: "= Shared Servers =",
value: target.userProfile.mutualGuilds,
inline: true
}, },
{ {
name: "= Account Creation Date =", name: "= Account Creation Date =",
value: dateFormat(user.createdAt), value: dateFormat(user.createdAt) !== null ? dateFormat(user.createdAt) : "Unknown"
inline: true
}, },
{ {
name: "= Days Since Creation =", name: "= Days Since Creation =",
value: daysCreated.toFixed(0), value: daysCreated.toFixed(0) !== null ? daysCreated.toFixed(0) : "Unknown"
inline: true },
}
{ {
name: "= Server Join Date =", name: "= Server Join Date =",
value: target.guildMember.joinedAt, value: member.joinedAt !== null ? member.joinedAt : "Unknown"
inline: true
}, },
{ {
name: "= Days Since Joining =", name: "= Days Since Joining =",
value: daysJoined.toFixed(0), value: daysJoined.toFixed(0) !== null ? daysJoined.toFixed(0) : "Unknown"
inline: true
}, },
{ {
name: "= Last Spoken =", name: "= Last Spoken =",
value: `**${target.guildMember.lastMessage.createdAt}**, at server **${target.guildMember.lastMessage.guild}**`, value: member.lastMessage !== null ? `**${member.lastMessage.createdAt}**, at server **${member.lastMessage.guild}**` : "Unknown"
inline: true
}, },
{ {
name: "= User Roles =", name: "= User Roles =",
value: roles, value: `\`${roles.join('\`, \`')}\``
inline: true
} }
], ],
{ {
inline: true, inline: true,
footer: `Sent by ${message.author}` footer: `Sent by ${message.author.tag}`,
footerIcon: message.author.avatarURL footerIcon: message.author.avatarURL
}); })
})
}; };
exports.conf = { exports.conf = {