More restructuring

This commit is contained in:
2026-08-22 17:35:12 -04:00
parent 3f2474f3f4
commit cc116c2ec3
7 changed files with 5 additions and 5 deletions
+24
View File
@@ -0,0 +1,24 @@
import type { Message } from "discord.js";
import type { Command } from "../service";
import Chan from "../../util/chan";
export default {
name: "chan",
description: "Get random media from a 4chan board.",
usage: ".chan <board> [search]",
execute: async (message: Message) => {
const [, board, search] = message.content.split(/\s+/);
if (!board) {
await message.reply("Usage: .chan <board> [search]")
return;
};
if (Chan.isNsfwBoard(board)) {
await message.reply("Fuck off nigger")
return;
};
await message.reply(await Chan.getMediaLink(board, search));
}
} satisfies Command;