toPlainText method

  1. @override
String toPlainText([
  1. Iterable<EmbedBuilder>? embedBuilders,
  2. EmbedBuilder? unknownEmbedBuilder
])
override

Implementation

@override
String toPlainText([
  Iterable<EmbedBuilder>? embedBuilders,
  EmbedBuilder? unknownEmbedBuilder,
]) {
  final builders = embedBuilders;

  if (builders != null) {
    for (final builder in builders) {
      if (builder.key == value.type) {
        return builder.toPlainText(this);
      }
    }
  }

  if (unknownEmbedBuilder != null) {
    return unknownEmbedBuilder.toPlainText(this);
  }

  return Embed.kObjectReplacementCharacter;
}