setDefaultReactionEmoji method

Future<void> setDefaultReactionEmoji(
  1. EmojiBuilder emoji
)

Defines the default emoji of this

final channel = guild.channels.cache.getOrFail('...');
await channel.setDefaultReactionEmoji(EmojiBuilder.fromUnicode('🧱'));

Implementation

Future<void> setDefaultReactionEmoji (EmojiBuilder emoji) async {
  final _emoji = {};
  if (emoji.emoji.id.isNotEmpty) {
    _emoji.putIfAbsent('emoji_id', () => emoji.emoji.id);
  }

  if (emoji.emoji.label.isNotEmpty) {
    _emoji.putIfAbsent('emoji_name', () => emoji.emoji.label);
  }

  await update(ChannelBuilder({
    'default_reaction_emoji': _emoji
  }));
}