From a785839dc452ebe1fb29dc28f7d879ccb0af5f19 Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Sun, 20 Mar 2022 08:58:54 -0600 Subject: [PATCH] more avatar bugs --- commands/misc/avatar.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/misc/avatar.js b/commands/misc/avatar.js index e6d7719..e6759f2 100644 --- a/commands/misc/avatar.js +++ b/commands/misc/avatar.js @@ -15,8 +15,9 @@ module.exports = { extra: null }, async execute(message, msg, args, cmd, prefix, mention, client) { - let member = args.length ? (mention || client.users.cache.get(args[0]) || message.author) : message.author; - await client.users.fetch(member.id, {force: true}); + let fail = false; + await client.users.fetch(member.id, {force: true}).catch(() => fail = true); + let member = args.length && !fail ? (mention || client.users.cache.get(args[0]) || message.author) : message.author; if (message.guild) {message.guild.members.fetch(member.id, {force: true});} let name = message.guild ? message.guild.members.cache.get(member.id).displayName : member.username; let options = new TagFilter([