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 {

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