1
0
Fork 0
polaris-task-force/src/bot/commands/index.ts

30 lines
1 KiB
TypeScript

import type { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
import type { Payload } from "payload";
import { pingCommand } from "./ping";
import { signupCommand } from "./signup";
import { linkCommand } from "./link";
import { announceCommand } from "./announce";
import { changelogCommand } from "./changelog";
import { remindEvaluationsCommand } from "./remindEvaluations";
import { rollCallCommand } from "./rollcall";
export interface BotCommand {
builder: SlashCommandBuilder;
execute: (interaction: ChatInputCommandInteraction, payload: Payload) => Promise<void> | void;
/**
* Registration scope. "global" = available in DMs and every guild the bot is
* in; "guild" (default) = only the configured guild. Discord never exposes
* guild-scoped commands in DMs, so DM-only commands like /signup must be global.
*/
scope?: "global" | "guild";
}
export const commands: BotCommand[] = [
pingCommand,
signupCommand,
linkCommand,
announceCommand,
changelogCommand,
remindEvaluationsCommand,
rollCallCommand,
];