EmojiManager.fromList constructor

EmojiManager.fromList(
  1. List<Role> roles,
  2. List<Emoji> emojis
)

Implementation

factory EmojiManager.fromList(List<Role> roles, List<Emoji> emojis) {
  return EmojiManager(
      Map<Snowflake, Emoji>.from(emojis.fold({}, (value, element) {
    return {...value, element.id: element};
  })));
}