fix: error

This commit is contained in:
Siwoo Jeon 2023-11-25 15:22:39 +09:00
parent dce1e072da
commit f2e6a8b1b1
Signed by: migan
GPG key ID: C4151385FFD2082A

View file

@ -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<LearnData[]>(
@ -13,10 +16,6 @@ export default class extends Command {
[command],
)
if (!command) {
return msg.channel.send('```멒힌아 삭제 (지울 단어)```')
}
if (!rows[0]) {
return await msg.channel.send('해당하는 걸 찾ㅈ을 수 없어요.')
}