setHoist method

Future<void> setHoist(
  1. bool hoist
)

Modifies the hoist of the role from bool.

Example :

final Role? role = guild.roles.cache.get('240561194958716924');
if (role != null) {
  await role.setHoist(true);
}

Implementation

Future<void> setHoist (bool hoist) async {
  Http http = ioc.singleton(Service.http);

  Response response = await http.patch(url: "/guilds/${manager.guild.id}/roles/$id", payload: { 'hoist': hoist });
  if (response.statusCode == 200) {
    _hoist = hoist;
  }
}