ChannelManager.fromList constructor

ChannelManager.fromList(
  1. List<ServerChannel> channels,
  2. dynamic payload
)

Implementation

factory ChannelManager.fromList(List<ServerChannel> channels, payload) {
  return ChannelManager(
      Map<Snowflake, ServerChannel>.from(channels.fold({}, (value, element) {
        return {...value, element.id: element};
      })),
      payload);
}