Improve service handling

This commit is contained in:
2026-08-22 17:48:47 -04:00
parent cc116c2ec3
commit 669af5ad14
11 changed files with 70 additions and 69 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
import type { Message } from "discord.js";
import type { Command } from "../service";
import Chan from "../../util/chan";
import ChanService from "../../services/chan";
import type { Command } from "../../models";
export default {
name: "chan",
@@ -14,11 +14,11 @@ export default {
return;
};
if (Chan.isNsfwBoard(board)) {
if (ChanService.isNsfwBoard(board)) {
await message.reply("Fuck off nigger")
return;
};
await message.reply(await Chan.getMediaLink(board, search));
await message.reply(await ChanService.getMediaLink(board, search));
}
} satisfies Command;
+3 -3
View File
@@ -1,6 +1,6 @@
import type { Message } from "discord.js";
import type { Command } from "../service";
import Chan from "../../util/chan";
import ChanService from "../../services/chan";
import type { Command } from "../../models";
export default {
name: "comfy",
@@ -9,6 +9,6 @@ export default {
execute: async (message: Message) => {
const boards = ["wsg", "wg"];
const board = boards[Math.floor(Math.random() * boards.length)] ?? "wsg";
await message.reply(await Chan.getMediaLink(board, "comfy"));
await message.reply(await ChanService.getMediaLink(board, "comfy"));
}
} satisfies Command;
@@ -1,10 +1,10 @@
import type { Message } from "discord.js";
import type { Command } from "../service";
import type { Command } from "../../models";
export default {
name: "limbo",
name: "limbomode",
description: "Toggles on/off limbo mode. When limbo mode is on, new members will be placed in #limbo. When off, new members will be placed in #chat-and-shitpost.",
usage: ".limbo [on|off]",
usage: ".limbomode [on|off]",
execute: async (message: Message) => {
}
} satisfies Command;
+1 -1
View File
@@ -1,5 +1,5 @@
import type { Message } from "discord.js";
import type { Command } from "../service";
import type { Command } from "../../models";
export default {
name: "redpillme",
+10
View File
@@ -0,0 +1,10 @@
import type { Message } from "discord.js";
import type { Command } from "../../models";
export default {
name: "roleinit",
description: "Creates all of the required roles, if they do not exist yet.",
usage: ".roleinit",
execute: async (message: Message) => {
}
} satisfies Command;