Channel is a generic term for something which 1) is one value per pixel (ie, grayscale) and 2) has the same size as the canvas. It is not one of the RGB channels, which are "virtual" anyway, since they are the result of the composition of all the layers.
Since its for a script, what are you trying to do? Are you trying to set/isolate one of the color channels? If so on what layer?
Since its for a script, what are you trying to do? Are you trying to set/isolate one of the color channels? If so on what layer?