delete method

Future<bool> delete({
  1. String? reason,
})

Deletes this

final GuildChannel channel = guild.channels.cache.getOrFail('240561194958716924');
await channel.delete()

Implementation

Future<bool> delete ({ String? reason }) async {
  Response response = await ioc.use<DiscordApiHttpService>().destroy(url: '/channels/$id')
    .auditLog(reason)
    .build();

  guild.channels.cache.remove(this);
  return response.statusCode == 200;
}