From c8fec5b0c7af2bc06bfd4b5e5be93e607499458f Mon Sep 17 00:00:00 2001 From: Siwoo Jeon Date: Sun, 6 Oct 2024 15:54:35 +0900 Subject: [PATCH] fix: type error --- src/interaction-handlers/deleteLearn.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interaction-handlers/deleteLearn.ts b/src/interaction-handlers/deleteLearn.ts index 9fff51e..bb8c363 100644 --- a/src/interaction-handlers/deleteLearn.ts +++ b/src/interaction-handlers/deleteLearn.ts @@ -28,7 +28,7 @@ class DeleteLearnHandler extends InteractionHandler { public async run(interaction: StringSelectMenuInteraction) { await interaction.deferUpdate() - const id = Number(interaction.values[0].slice(`${this._CUSTOM_ID}-`.length)) + const id = interaction.values[0].slice(`${this._CUSTOM_ID}-`.length) const db = this.container.database const decimalRegexp = /^[0-9]/g @@ -50,7 +50,7 @@ class DeleteLearnHandler extends InteractionHandler { await db.learn.delete({ where: { - id, + id: Number(id), }, })