build method

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

Implementation

@override
Map<String, Object?> build() => {
      if (!identical(content, sentinelString)) 'content': content,
      if (!identical(embeds, sentinelList)) 'embeds': embeds!.map((e) => e.build()).toList(),
      if (allowedMentions != null) 'allowed_mentions': allowedMentions!.build(),
      if (components != null) 'components': components!.map((e) => e.build()).toList(),
      if (!identical(attachments, sentinelList)) 'attachments': attachments!.map((e) => e.build()).toList(),
      if (suppressEmbeds != null) 'flags': (suppressEmbeds == true ? MessageFlags.suppressEmbeds.value : 0),
    };