build method
override
Implementation
@override
Map<String, Object?> build() => {
'name': name,
if (icon != null) 'icon': icon!.buildDataString(),
if (verificationLevel != null) 'verification_level': verificationLevel!.value,
if (defaultMessageNotificationLevel != null) 'default_message_notifications': defaultMessageNotificationLevel!.value,
if (explicitContentFilterLevel != null) 'explicit_content_filter': explicitContentFilterLevel!.value,
if (roles != null) 'roles': roles!.map((b) => b.build()).toList(),
if (channels != null) 'channels': channels!.map((b) => b.build()).toList(),
if (afkChannelId != null) 'afk_channel_id': afkChannelId!.toString(),
if (afkTimeout != null) 'afk_timeout': afkTimeout!.inSeconds,
if (systemChannelId != null) 'system_channel_id': systemChannelId!.toString(),
if (systemChannelFlags != null) 'system_channel_flags': systemChannelFlags!.value,
};