registerGlobalCommands method

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

Implementation

Future<void> registerGlobalCommands ({ required List<SlashCommand> commands }) async {
  Http http = ioc.singleton(Service.http);

  await http.put(
    url: "/applications/${_application.id}/commands",
    payload: commands.map((command) => command.toJson()).toList()
  );
}