delete method

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

Delete an integration from the guild.

Implementation

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

  await client.httpHandler.executeSafe(request);

  cache.remove(id);
}