build method

  1. @override
Map<String, Object?> build()
override

Implementation

@override
Map<String, Object?> build() => {
      if (name != null) 'name': name,
      if (verificationLevel != null) 'verification_level': verificationLevel!.value,
      if (defaultMessageNotificationLevel != null) 'default_message_notifications': defaultMessageNotificationLevel!.value,
      if (explicitContentFilterLevel != null) 'explicit_content_filter': explicitContentFilterLevel!.value,
      if (!identical(afkChannelId, sentinelSnowflake)) 'afk_channel_id': afkChannelId?.toString(),
      if (afkTimeout != null) 'afk_timeout': afkTimeout!.inSeconds,
      if (!identical(icon, sentinelImageBuilder)) 'icon': icon?.buildDataString(),
      if (newOwnerId != null) 'owner_id': newOwnerId!.toString(),
      if (!identical(splash, sentinelImageBuilder)) 'splash': splash?.buildDataString(),
      if (!identical(discoverySplash, sentinelImageBuilder)) 'discovery_splash': discoverySplash?.buildDataString(),
      if (!identical(banner, sentinelImageBuilder)) 'banner': banner?.buildDataString(),
      if (!identical(systemChannelId, sentinelSnowflake)) 'system_channel_id': systemChannelId?.toString(),
      if (systemChannelFlags != null) 'system_channel_flags': systemChannelFlags!.value,
      if (!identical(rulesChannelId, sentinelSnowflake)) 'rules_channel_id': rulesChannelId?.toString(),
      if (!identical(publicUpdatesChannelId, sentinelSnowflake)) 'public_updates_channel_id': publicUpdatesChannelId?.toString(),
      if (preferredLocale != null) 'preferred_locale': preferredLocale!.identifier,
      if (features != null) 'features': GuildManager.serializeGuildFeatures(features!),
      if (!identical(description, sentinelString)) 'description': description,
      if (premiumProgressBarEnabled != null) 'premium_progress_bar_enabled': premiumProgressBarEnabled,
      if (!identical(safetyAlertsChannelId, sentinelSnowflake)) 'safety_alerts_channel_id': safetyAlertsChannelId?.toString(),
    };