removeRole method

Future<void> removeRole(
  1. Snowflake id,
  2. Snowflake roleId,
  3. {String? auditLogReason}
)

Remove a role from a member in the guild.

Implementation

Future<void> removeRole(Snowflake id, Snowflake roleId, {String? auditLogReason}) async {
  final route = HttpRoute()
    ..guilds(id: guildId.toString())
    ..members(id: id.toString())
    ..roles(id: roleId.toString());
  final request = BasicRequest(route, method: 'DELETE', auditLogReason: auditLogReason);

  await client.httpHandler.executeSafe(request);
}