Update userinfo.js
This commit is contained in:
parent
936a1dbc9d
commit
362f4ea98d
1 changed files with 11 additions and 15 deletions
|
@ -29,10 +29,7 @@ module.exports = {
|
||||||
Date.now() - interaction.guild.members.cache.get(member.id).joinedAt;
|
Date.now() - interaction.guild.members.cache.get(member.id).joinedAt;
|
||||||
const created = Math.floor(x / 86400000);
|
const created = Math.floor(x / 86400000);
|
||||||
const joined = Math.floor(y / 86400000);
|
const joined = Math.floor(y / 86400000);
|
||||||
const nickname =
|
const nickname = member.nickname || "None";
|
||||||
member.nickname !== undefined && member.nickname !== null
|
|
||||||
? member.nickname
|
|
||||||
: "None";
|
|
||||||
const roles = member.roles.cache
|
const roles = member.roles.cache
|
||||||
.filter(r => r.id != interaction.guild.id)
|
.filter(r => r.id != interaction.guild.id)
|
||||||
.sort((a, b) => b.position - a.position)
|
.sort((a, b) => b.position - a.position)
|
||||||
|
@ -44,18 +41,17 @@ module.exports = {
|
||||||
const joinDateFormatted = utils.parseDate(new Date(member.joinedAt));
|
const joinDateFormatted = utils.parseDate(new Date(member.joinedAt));
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: member.user.tag,
|
name: `${member.user.tag} ${client.owners.includes(member.id)) ? client.dev : ""}`,
|
||||||
iconURL: member.user.displayAvatarURL({ dynamic: true, size: 2048 }),
|
iconURL: member.user.displayAvatarURL({ dynamic: true, size: 4096 }),
|
||||||
})
|
})
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setColor(member.displayHexColor || client.color)
|
.setColor(member.displayHexColor || client.color)
|
||||||
.setURL(client.web)
|
.setURL(client.web)
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: `Made by ${client.author}`,
|
text: `Made by ${client.author}`,
|
||||||
iconURL: client.user.displayAvatarURL({ dynamic: true }),
|
iconURL: client.user.displayAvatarURL({ dynamic: true, size: 4096 }),
|
||||||
})
|
})
|
||||||
.setThumbnail(member.user.displayAvatarURL({ dynamic: true, size: 512 }))
|
.setThumbnail(member.user.displayAvatarURL({ dynamic: true, size: 4096 }))
|
||||||
.setColor(member.displayHexColor || client.color)
|
|
||||||
.addFields([
|
.addFields([
|
||||||
{
|
{
|
||||||
name: "User",
|
name: "User",
|
||||||
|
@ -67,7 +63,7 @@ module.exports = {
|
||||||
dynamic: true,
|
dynamic: true,
|
||||||
size: 2048,
|
size: 2048,
|
||||||
})})
|
})})
|
||||||
**❯ Time Created:** ${createDateFormatted} \nSince ${created} day(s) ago
|
**❯ Time Created:** ${createDateFormatted} \nSince ${created} day${created <= 1 ? "" : "s"} ago
|
||||||
\u200b`,
|
\u200b`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -77,11 +73,11 @@ module.exports = {
|
||||||
? "None"
|
? "None"
|
||||||
: member.roles.highest.name
|
: member.roles.highest.name
|
||||||
}
|
}
|
||||||
**❯ Server Join Date:** ${joinDateFormatted} \nSince ${joined} day(s) ago
|
**❯ Server Join Date:** ${joinDateFormatted} \nSince ${joined} day${joined <= 1 ? "" : "s"} ago
|
||||||
**❯ Roles [${roles.length}]:** ${
|
**❯ Roles [${roles.length}]:** ${
|
||||||
roles.length < 10
|
roles.length < 10 && roles.length > 0
|
||||||
? roles.join(" **|** ")
|
? roles.join(" **|** ")
|
||||||
: roles.length > 10
|
: roles.length > 0
|
||||||
? utils.trimArray(roles)
|
? utils.trimArray(roles)
|
||||||
: "None"
|
: "None"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue