Added getChannels command to return a list of channels of a particular type safely.