diff --git a/src/commands/avatar.ts b/src/commands/avatar.ts index 350fa9c..7485bc6 100644 --- a/src/commands/avatar.ts +++ b/src/commands/avatar.ts @@ -41,7 +41,7 @@ export default async function handle(command: Command) { } case "removeall": { for (const id in AvatarExcelTable) { - if (!(id == '1001')) { + if (Number(id) !== 1001) { await Avatar.remove(uid, parseInt(id)); } } diff --git a/src/db/Avatar.ts b/src/db/Avatar.ts index 3696a68..ea307df 100644 --- a/src/db/Avatar.ts +++ b/src/db/Avatar.ts @@ -62,7 +62,7 @@ export default class Avatar { public static async remove(ownerUid: UID, baseAvatarId: number): Promise { const db = Database.getInstance(); - await db.delete("avatars", { ownerUid, baseAvatarId }); + await db.delete("avatars", { ownerUid, "data.baseAvatarId": baseAvatarId }); } } \ No newline at end of file