diff --git a/src/plugins/yandere/commands.ts b/src/plugins/yandere/commands.ts index e97aac0..9500dae 100644 --- a/src/plugins/yandere/commands.ts +++ b/src/plugins/yandere/commands.ts @@ -1,27 +1,6 @@ import { ChatInputCommandInteraction, SlashCommandBuilder } from "@discordjs"; import { getPosts } from "@root/plugins/yandere/api/api.ts"; -// export async function yandereMessageHandler(message: Message) { -// const command = message.content.split(" ").slice(1).join(" "); -// const args = command.match(/(\[.+\])/g) -// if (command === "drop") { -// const embed: DiscordEmbed | undefined = (await getPosts("[limit: 1]"))[0] -// if (embed === undefined) throw Error("undefined embed") -// bot.helpers.sendMessage(message.channelId, { -// embeds: [embed] -// }) -// } else if (command.startsWith("drop [") && command.endsWith("]")) { -// logMessage(message); -// if (args === null) throw Error("args is null") -// const generatedEmbeds = await getPosts(args[0]); -// for (const embed of generatedEmbeds) { -// bot.helpers.sendMessage(message.channelId, { -// embeds: [embed], -// }); -// } -// } -// } - export const commands = [ { data: new SlashCommandBuilder() diff --git a/src/plugins/yandere/plugin.ts b/src/plugins/yandere/plugin.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/plugins/yandere/test.ts b/src/plugins/yandere/test.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/plugins/yandere/tests/api.ts b/src/plugins/yandere/tests/api.ts index ba02bd3..c3254d9 100644 --- a/src/plugins/yandere/tests/api.ts +++ b/src/plugins/yandere/tests/api.ts @@ -5,13 +5,19 @@ Deno.test("Empty Post Request", async() => { }) Deno.test("Post Request with tag", async() => { - console.debug(await getPosts("[tags:love_live!_(series)]")) + console.debug(await getPosts( + {tags: "love_live!_(series)"} + )) }) Deno.test("Post Request with limit", async() => { - console.debug(await getPosts("[limit: 1)]")) + console.debug(await getPosts({ + limit: "1" + })) }) Deno.test("Post Request with page", async() => { - console.debug(await getPosts("[page: 30)]")) + console.debug(await getPosts( + {page: "30"} + )) }) \ No newline at end of file