my suffering never ends

This commit is contained in:
Essem 2021-08-01 07:16:43 -05:00
parent 65c4dbae6a
commit b24982a298
No known key found for this signature in database
GPG Key ID: 7D497397CC3A2A8C
2 changed files with 4 additions and 3 deletions

View File

@ -4,8 +4,9 @@ class AvatarCommand extends Command {
async run() {
if (this.message.mentions[0] !== undefined) {
return this.message.mentions[0].dynamicAvatarURL(null, 1024);
} else if (await this.ipc.fetchUser(this.args[0]) !== undefined) {
return await this.ipc.fetchUser(this.args[0]).dynamicAvatarURL(null, 1024);
} else if (await this.ipc.fetchUser(this.args[0])) {
const user = await this.ipc.fetchUser(this.args[0]);
return user.avatar ? this.client._formatImage(`/avatars/${user.id}/${user.avatar}`, null, 1024) : `https://cdn.discordapp.com/embed/avatars/${user.discriminator % 5}.png`; // hacky "solution"
} else if (this.args.join(" ") !== "" && this.message.channel.guild) {
const userRegex = new RegExp(this.args.join("|"), "i");
const member = this.message.channel.guild.members.find(element => {

View File

@ -42,7 +42,7 @@ class UserInfoCommand extends Command {
},
{
"name": "💬 **Joined this server on:**",
"value": member ? `<t:${member.joinedAt}:F>` : "N/A"
"value": member ? `<t:${Math.floor(member.joinedAt / 1000)}:F>` : "N/A"
}
]
}