toJson method

Object toJson()

Implementation

Object toJson () {
  final List<dynamic> _embeds = [];
  if (embeds != null) {
    for (final embed in embeds!) {
      _embeds.add(embed.toJson());
    }
  }

  final List<dynamic> _components = [];
  if (components != null) {
    for (final component in components!) {
      _components.add(component.toJson());
    }
  }

  final List<dynamic> _stickers = [];
  if (stickers != null) {
    for (final sticker in stickers!) {
      _stickers.add(sticker.toJson());
    }
  }


  return {
    'content': content,
    'embeds': _embeds,
    'components': _components,
    'stickers': _stickers
  };
}