removeDiscoverySplash method

Future<void> removeDiscoverySplash()

Remove the discovery splash banner of this

This method requires the feature GuildFeature.banner of this

Example :

await guild.removeDiscoverySplash();

Implementation

Future<void> removeDiscoverySplash () async {
  if (!features.contains(GuildFeature.banner)) {
    throw MissingFeatureException(cause: "The $name guild does not have the ${GuildFeature.discoverable} feature.");
  }

  Http http = ioc.singleton(Service.http);
  Response response = await http.patch(url: "/guilds/$id", payload: { 'discovery_splash': null });

  if (response.statusCode == 200) {
    _discoverySplash = null;
  }
}