From da3e32a99f72e038111425153098dab3493fe792 Mon Sep 17 00:00:00 2001 From: Migan178 Date: Sat, 2 Dec 2023 23:53:42 +0900 Subject: [PATCH] .a --- src/Commands/list.ts | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 src/Commands/list.ts diff --git a/src/Commands/list.ts b/src/Commands/list.ts deleted file mode 100644 index dd59a6a..0000000 --- a/src/Commands/list.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Message, codeBlock } from 'discord.js' -import { Command, LearnData } from '../modules' -export default class extends Command { - public constructor() { - super('리스트') - } - public async execute(msg: Message, args: string[]) { - const db = await msg.client.chatBot.db.getConnection() - const [rows] = await db.execute( - 'SELECT * FROM learn WHERE user_id = ?;', - [msg.author.id], - ) - const list: string[] = [] - if (!rows) { - return await msg.channel.send( - '당신ㄴ은 단어를 가르쳐준 기억이 없ㅅ는데요.', - ) - } - for (const data of rows) { - list.push(data.command) - } - await msg.channel.send({ - embeds: [ - { - title: '지식', - description: codeBlock( - 'md', - list.map(item => `- ${item}`).join('\n'), - ), - color: 0x0000ff, - timestamp: new Date().toISOString(), - }, - ], - }) - } -}