SaysHQ
SaysHQ
SIASapphire - Imagine a framework
Created by SaysHQ on 10/6/2023 in #sapphire-support
Decorator Style for Register Subcommands
Tysm for your help it works! You are really Awesome pikawow
18 replies
SIASapphire - Imagine a framework
Created by SaysHQ on 10/6/2023 in #sapphire-support
Decorator Style for Register Subcommands
Why? Its in the official Sapphire Docs too btw.
18 replies
SIASapphire - Imagine a framework
Created by SaysHQ on 10/6/2023 in #sapphire-support
Decorator Style for Register Subcommands
18 replies
SIASapphire - Imagine a framework
Created by SaysHQ on 10/6/2023 in #sapphire-support
Decorator Style for Register Subcommands
Wdym? I dont understand
18 replies
SIASapphire - Imagine a framework
Created by SaysHQ on 10/6/2023 in #sapphire-support
Decorator Style for Register Subcommands
Just to be sure i need this core, right? Or Anthing else?
registerApplicationCommands(registry: Subcommand.Registry) {
registry.registerChatInputCommand((builder) =>
builder
.setName('vip')
.setDescription('Vip command') // Needed even though base command isn't displayed to end user
.addSubcommand((command) => command.setName('list').setDescription('List vips'))
.addSubcommandGroup((group) =>
group
.setName('action')
.setDescription('action subcommand group') // Also needed even though the group isn't displayed to end user
.addSubcommand((command) =>
command
.setName('add')
.setDescription('Add a vip')
.addUserOption((option) =>
option.setName('user').setDescription('user to add to vip list').setRequired(true)
)
)
.addSubcommand((command) =>
command
.setName('remove')
.setDescription('Remove a vip')
.addUserOption((option) =>
option.setName('user').setDescription('user to remove from vip list').setRequired(true)
)
)
)
);
}
registerApplicationCommands(registry: Subcommand.Registry) {
registry.registerChatInputCommand((builder) =>
builder
.setName('vip')
.setDescription('Vip command') // Needed even though base command isn't displayed to end user
.addSubcommand((command) => command.setName('list').setDescription('List vips'))
.addSubcommandGroup((group) =>
group
.setName('action')
.setDescription('action subcommand group') // Also needed even though the group isn't displayed to end user
.addSubcommand((command) =>
command
.setName('add')
.setDescription('Add a vip')
.addUserOption((option) =>
option.setName('user').setDescription('user to add to vip list').setRequired(true)
)
)
.addSubcommand((command) =>
command
.setName('remove')
.setDescription('Remove a vip')
.addUserOption((option) =>
option.setName('user').setDescription('user to remove from vip list').setRequired(true)
)
)
)
);
}
NVM I`ll try it out sorry 🙈
18 replies
SIASapphire - Imagine a framework
Created by SaysHQ on 10/6/2023 in #sapphire-support
Decorator Style for Register Subcommands
Will it come in the future? 🥺
18 replies
SIASapphire - Imagine a framework
Created by SaysHQ on 10/6/2023 in #sapphire-support
Decorator Style for Register Subcommands
That Sounds kinda complicated. So if i dont want to use that i need to use it the Normal Way?
18 replies