wynn/ts/src/bot/botevent/slash_commands.ts

45 lines
1.2 KiB
TypeScript
Raw Normal View History

2025-03-02 11:49:36 +00:00
import { ApplicationCommandOptionTypes, ApplicationCommandTypes, CreateApplicationCommand } from "discordeno"
2025-03-01 21:10:31 +00:00
2025-06-14 03:52:32 +00:00
const createCommands = <T extends CreateApplicationCommand[]>(commands: T): T => {
return commands
}
export const SLASH_COMMANDS = createCommands([
{
name: `guild`,
description: "guild commands",
type: ApplicationCommandTypes.ChatInput,
options: [
2025-03-02 11:49:36 +00:00
{
2025-06-14 03:52:32 +00:00
name: "leaderboard",
description: "view the current leaderboard",
type: ApplicationCommandOptionTypes.SubCommand,
2025-03-02 11:49:36 +00:00
},
{
2025-06-14 03:52:32 +00:00
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,
2025-03-01 21:10:31 +00:00
},
2025-06-14 03:52:32 +00:00
],
2025-03-01 21:10:31 +00:00
}
2025-06-14 03:52:32 +00:00
])