fix command
This commit is contained in:
parent
4b4fd90599
commit
4ca8b97336
1 changed files with 19 additions and 35 deletions
|
@ -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;
|
||||||
|
@ -22,14 +18,14 @@ exports.run = async (client, message, args, level) => {
|
||||||
const daysJoined = millisJoined / 1000 / 60 / 60 / 24;
|
const daysJoined = millisJoined / 1000 / 60 / 60 / 24;
|
||||||
|
|
||||||
let roles = member.roles.array().slice(1).sort((a, b) => a.comparePositionTo(b)).reverse().map(role => role.name);
|
let roles = member.roles.array().slice(1).sort((a, b) => a.comparePositionTo(b)).reverse().map(role => role.name);
|
||||||
if (roles.length < 1) roles = ['None'];
|
if (roles.length < 1) roles = ['None'];
|
||||||
|
|
||||||
let game = (user.presence.game && user.presence.game && user.presence.game.name) || 'Not playing a game.'
|
let game = (user.presence.game && user.presence.game && user.presence.game.name) || 'Not playing a game.'
|
||||||
|
|
||||||
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,61 +37,49 @@ 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 = {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
guildOnly: true,
|
guildOnly: true,
|
||||||
aliases: ["user","uinfo"],
|
aliases: ["user", "uinfo"],
|
||||||
permLevel: "User"
|
permLevel: "User"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue