registerGlobalCommands method

Future<void> registerGlobalCommands({
  1. required List<AbstractCommand<CommandInteraction>> commands,
})

Implementation

Future<void> registerGlobalCommands ({ required List<AbstractCommand> commands }) async {
  await ioc.use<DiscordApiHttpService>().put(url: "/applications/${_application.id}/commands")
    .payload(commands.map((command) => command.serialize).toList())
    .build();
}