delete method
override
Delete the item with the given id
from the API.
Implementers should ensure this method updates the cache.
Implementation
@override
Future<void> delete(Snowflake id, {String? token, String? auditLogReason}) async {
final route = HttpRoute()..webhooks(id: id.toString());
if (token != null) {
route.add(HttpRoutePart(token));
}
final request = BasicRequest(route, method: 'DELETE', authenticated: token == null, auditLogReason: auditLogReason);
await client.httpHandler.executeSafe(request);
cache.remove(id);
}