registerGuildCommands method
Future<void>
registerGuildCommands({
- required Guild guild,
- required List<
CommandBuilder> commands, - required List<
MineralContextMenu> contextMenus,
Implementation
Future<void> registerGuildCommands ({ required Guild guild, required List<CommandBuilder> commands, required List<MineralContextMenu> contextMenus }) async {
await ioc.use<HttpService>().put(
url: "/applications/${_application.id}/guilds/${guild.id}/commands",
payload: [
...commands.map((command) => command.toJson).toList(),
...contextMenus.map((contextMenus) => contextMenus.builder.toJson).toList()
]
);
}