From ed782a7b9682409875a693718cc67a23ab968490 Mon Sep 17 00:00:00 2001 From: Siwoo Jeon Date: Mon, 30 Sep 2024 21:43:20 +0900 Subject: [PATCH] fix: Can't delete the not exist data. --- src/Commands/deleteLearn.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Commands/deleteLearn.ts b/src/Commands/deleteLearn.ts index 321a83b..3318e44 100644 --- a/src/Commands/deleteLearn.ts +++ b/src/Commands/deleteLearn.ts @@ -35,13 +35,13 @@ class DeleteLearnCommand extends Command { ) if (!command) { - return await msg.channel.send( + return await msg.reply( `사용법: \n\`\`\`${(this.detailedDescription as DetailedDescriptionCommandObject).usage}\`\`\``, ) } - if (!deleteDatas) { - return await msg.channel.send('해당하는 걸 찾ㅈ을 수 없어요.') + if (deleteDatas.length === 0) { + return await msg.reply('해당하는 걸 찾ㅈ을 수 없어요.') } for (let i = 1; i <= deleteDatas.length; i++) {