From b225936027b1ef8f2b8f6fee758857a31878de08 Mon Sep 17 00:00:00 2001 From: holzmaster Date: Fri, 13 Sep 2024 23:08:30 +0200 Subject: [PATCH] Fix logic --- src/commands/gegenstand.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/gegenstand.ts b/src/commands/gegenstand.ts index 86e51f37..afce44e5 100644 --- a/src/commands/gegenstand.ts +++ b/src/commands/gegenstand.ts @@ -214,9 +214,9 @@ export default class GegenstandCommand implements ApplicationCommand { return; } - let removeFromInventory = false; + let keepInInventory = true; try { - removeFromInventory = await template.onUse( + keepInInventory = await template.onUse( interaction as LootUseCommandInteraction, context, item, @@ -230,7 +230,7 @@ export default class GegenstandCommand implements ApplicationCommand { }); } - if (removeFromInventory) { + if (!keepInInventory) { await lootService.deleteLoot(item.id); } }