setExplicitContentFilter method

Future<void> setExplicitContentFilter(
  1. ExplicitContentLevel level
)

Defines the explicit content level of this

await guild.setExplicitContentFilter(ExplicitContentLevel.allMembers);

Implementation

Future<void> setExplicitContentFilter (ExplicitContentLevel level) async {
  Response response = await ioc.use<DiscordApiHttpService>().patch(url: "/guilds/$id")
    .payload({ 'explicit_content_filter': level.value })
    .build();

  if (response.statusCode == 200) {
    _explicitContentFilter = level.value;
  }
}