Fixed avatar arg issue, fixed motivate bottom text

This commit is contained in:
Essem 2021-12-30 14:27:18 -06:00
parent e66f45ba0f
commit 1a76d4d0c4
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
3 changed files with 3 additions and 2 deletions

View file

@ -7,7 +7,7 @@ class AvatarCommand extends Command {
} 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[0].match(/^<?[@#]?[&!]?\d+>?$/) && this.args[0] >= 21154535154122752) {
} else if (this.args[0] && this.args[0].match(/^<?[@#]?[&!]?\d+>?$/) && this.args[0] >= 21154535154122752) {
try {
const user = await this.client.getRESTUser(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`; // repeat of hacky "solution" from above