Improve service handling
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,5 +1,5 @@
|
||||
import type { Message } from "discord.js";
|
||||
import type { Command } from "../service";
|
||||
import type { Command } from "../../models";
|
||||
|
||||
export default {
|
||||
name: "redpillme",
|
||||
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user