Groups
Groups should typically be registered through the @Register decorator.
Alternatively, you can use the registerGroup method. This
is useful if you want to share groups between classes decorated with @Register
.
Similar to commands, groups are synchronized to the client.
@Register({ groups: [ { name: "example", description: "Example group" } ]})export class MyCommand { // ...}
const server = Centurion.server();server.registry.registerGroup({ name: "info", description: "View info about a user or the server",},{ name: "user", description: "View info about a user", parent: ["info"],},{ name: "server", description: "View info about the server", parent: ["info"],},)server.start();