createSlashCommand method
Implementation
Future<dynamic> createSlashCommand(
String appId, {
required String name,
required String description,
required List<ApplicationCommandOption> options,
String? guildId,
}) {
var endpoint = '/applications/$appId';
if (guildId != null) {
endpoint += '/guilds/$guildId';
}
endpoint += '/commands';
return _http.request(
endpoint,
converter: (j) => j,
method: 'post',
body: {
'name': name,
'description': description,
'options': options,
},
);
}