def set_channels(channels, conf)
      if channels.nil?
        @channels = [] if @channels.nil?
        return
      end
      @channels = valid!(channels, Channel.deserialize_all(channels, conf),
                         :@channels,
                         invalid_error: 'invalid channel list %s') { [] }
    end
def set_channels(channels, conf)
      if channels.nil?
        @channels = [] if @channels.nil?
        return
      end
      @channels = valid!(channels, Channel.deserialize_all(channels, conf),
                         :@channels,
                         invalid_error: 'invalid channel list %s') { [] }
    end
Sets the list of channels.

 @param channels [Array<Channel>] the list of channels
 @param conf [Hash] the previously deserialized configuration