list method
- {bool? withLocalizations}
List the commands belonging to the application.
Implementation
Future<List<ApplicationCommand>> list({bool? withLocalizations}) async {
final route = HttpRoute()..applications(id: applicationId.toString());
if (_guildId != null) route.guilds(id: _guildId!.toString());
route.commands();
final request = BasicRequest(route, queryParameters: {if (withLocalizations != null) 'with_localizations': withLocalizations.toString()});
final response = await client.httpHandler.executeSafe(request);
final commands = parseMany(response.jsonBody as List, parse);
commands.forEach(client.updateCacheWith);
return commands;
}