createRole method
Implementation
Future<Role> createRole(
String guildId, {
String? name,
String? permissions,
int? color,
bool? hoist,
bool? mentionable,
}) {
var endpoint = '/guilds/$guildId/roles';
return _http.request(
endpoint,
converter: Role.fromJson,
method: 'post',
body: {
...insertNotNull('name', name),
...insertNotNull('permissions', permissions),
...insertNotNull('color', color),
...insertNotNull('hoist', hoist),
...insertNotNull('mentionable', mentionable),
},
);
}