From 0ff5564b435d64aea2ee8cc4d23244c020586f60 Mon Sep 17 00:00:00 2001 From: memetrollsXD Date: Tue, 2 Aug 2022 03:32:45 +0200 Subject: [PATCH] Critical Fix: Avatar already exists check --- src/commands/avatar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/avatar.ts b/src/commands/avatar.ts index c168acf..0a7c376 100644 --- a/src/commands/avatar.ts +++ b/src/commands/avatar.ts @@ -21,7 +21,7 @@ export default async function handle(command: Command) { if (!avatarId) return c.log("No avatarId specified"); // Check if it already exists const avatar = await Avatar.fromUID(uid, avatarId); - if (avatar) return c.log(`Avatar ${avatarId} already exists`); + if (avatar.length > 0) return c.log(`Avatar ${avatarId} already exists`); Avatar.create(uid, avatarId).then(a => c.log(`Avatar ${avatarId} added to ${a.ownerUid}`)); break; case "remove":