fix: Can't delete the not exist data.

This commit is contained in:
Siwoo Jeon 2024-09-30 21:43:20 +09:00
parent 115823f3a5
commit ed782a7b96
Signed by: migan
GPG key ID: 036E9A8C5E8E48DA

View file

@ -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++) {