Merge pull request #98 from hcs1219/main

userinfo
This commit is contained in:
Night 2023-05-21 17:43:12 +01:00 committed by GitHub
commit 603f8af515
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 15 deletions

View file

@ -55,9 +55,17 @@ class NYX extends Client {
"534027706325532694", // Cat drinking a cat "534027706325532694", // Cat drinking a cat
"381442059111759883", // Thunder "381442059111759883", // Thunder
"556808365574193194", // chunchunmaru "556808365574193194", // chunchunmaru
"687622268037365774", // Tac Shadow
"309681798957498368", // Sideload
"707177879984668673", // Random rock
"757530324686340197", // Madhav
"804712098625486848", // hcs
"1078015817184182414", // gaba
"774390900411465769" // Alphaus
]; ];
this.currency = "<:nyx_currency:918584872333893703>"; this.currency = "<:nyx_currency:918584872333893703>";
this.xp = "<:nyx_xp:900309007472926720>"; this.xp = "<:nyx_xp:900309007472926720>";
this.dev = "<:discord_bot_dev:840231906200387666>"
this.path = [ this.path = [
"614423108388126731", // Camper on Duty "614423108388126731", // Camper on Duty
"767173194943168542", // Dark Bonker "767173194943168542", // Dark Bonker

View file

@ -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)
@ -45,21 +42,21 @@ module.exports = {
const embed = new EmbedBuilder() const embed = new EmbedBuilder()
.setAuthor({ .setAuthor({
name: member.user.tag, name: member.user.tag,
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",
value: `** Username:** ${member.user.username} value: `** User Tag:** ${member.user.tag} ${client.owners.includes(member.id)) ? client.dev : ""}
** Username:** ${member.user.username}
** Discriminator:** ${member.user.discriminator} ** Discriminator:** ${member.user.discriminator}
** Nickname:** ${nickname} ** Nickname:** ${nickname}
** User ID:** ${member.id} ** User ID:** ${member.id}
@ -67,7 +64,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 +74,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"
} }