setMentionable method

Future<void> setMentionable(
  1. bool mentionable
)

Modifies the mentionable of the role from bool.

Example :

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

Implementation

Future<void> setMentionable (bool mentionable) async {
  Response response = await ioc.use<HttpService>().patch(url: "/guilds/${manager.guild.id}/roles/$id", payload: { 'mentionable': mentionable });

  if (response.statusCode == 200) {
    _mentionable = mentionable;
  }
}