Code help for my simple Node.js chatbot?

Thanks for the reply, Alca. So the code you’ve included should be correct? I tested it a few times with the code below. The subscription event occurred on channel1, but the bot sent the response “output test 3” to the chat, which should have only been sent if the event occurred on channel3.

I also tried running 3 blocks of this code, modified so the 1st block is for subscription, 2nd is resub, 3rd is a cheer event. The bot ignored any event on the 1st (sub) and 2nd (resub) blocks of code. But when a cheer occurred on channel1, it sent ‘output test 3’. Basically, it seems like it’s ignoring every bit of code except for very last command in the entire bot, if that makes sense.

client.on('subscription', function(_channel, username, method, message, userstate) {
    let channel = _channel.slice(1);
    let output = '';
    switch(channel) {
        case 'channel1':
            output = 'output test 1';
        case 'channel2':
            output = 'output test 2';
        case 'channel3':
            output = 'output test 3';
    }
    if(output) client.say(channel, output);
});