wynn/ts/src/bot/botevent/slash_commands.ts
2025-06-13 22:52:32 -05:00

45 lines
1.2 KiB
TypeScript

import { ApplicationCommandOptionTypes, ApplicationCommandTypes, CreateApplicationCommand } from "discordeno"
const createCommands = <T extends CreateApplicationCommand[]>(commands: T): T => {
return commands
}
export const SLASH_COMMANDS = createCommands([
{
name: `guild`,
description: "guild commands",
type: ApplicationCommandTypes.ChatInput,
options: [
{
name: "leaderboard",
description: "view the current leaderboard",
type: ApplicationCommandOptionTypes.SubCommand,
},
{
name: "info",
description: "view guild information",
type: ApplicationCommandOptionTypes.SubCommand,
},
{
name: "online",
description: "show online players",
type: ApplicationCommandOptionTypes.SubCommand,
},
],
},
{
name: "admin",
description: "admin commands",
type: ApplicationCommandTypes.ChatInput,
defaultMemberPermissions: [
"ADMINISTRATOR",
],
options: [
{
name: "set_wynn_guild",
description: "set the default wynncraft guild for the server",
type: ApplicationCommandOptionTypes.SubCommand,
},
],
}
])