diff --git a/src/Commands/deleteLearn.ts b/src/Commands/deleteLearn.ts index 72a4191..4c7582a 100644 --- a/src/Commands/deleteLearn.ts +++ b/src/Commands/deleteLearn.ts @@ -6,6 +6,9 @@ export default class extends Command { super('삭제') } public async execute(msg: Message, args: string[]) { + if (!args[0]) { + return await msg.channel.send('```멒힌아 삭제 (지울 단어)```') + } const db = await msg.client.chatBot.db.getConnection() const command = args[0] const [rows] = await db.execute( @@ -13,10 +16,6 @@ export default class extends Command { [command], ) - if (!command) { - return msg.channel.send('```멒힌아 삭제 (지울 단어)```') - } - if (!rows[0]) { return await msg.channel.send('해당하는 걸 찾ㅈ을 수 없어요.') }