setExplicitContentFilter method

Future<void> setExplicitContentFilter(
  1. int level
)

Defines the explicit content level of this

  • 0 → Disabled
  • 1 → Members without roles
  • 2 → All members

Example :

await guild.setExplicitContentFilter(2);

Implementation

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

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