The channel to check for (e.g., "moderator", "participant").
The parsed URL query parameters.
OptionalsetErrorMessage: (err: string) => voidFunction to set an error message if needed.
The passcode for the specified channel, or null if not found or error.
Extracts the passcode for a specific channel from the query parameters. If the channel is present but no passcode is provided, it sets an error message.