Code help for my simple Node.js chatbot?

Oh right, I don’t use switch/case … you need to add break; to the end of each case or else they “fall through.” This is why the last one gets to set the message last.

        case 'channel1':
            output = 'output test 1';
            break;
        case 'channel2':
            output = 'output test 2';
            break;
        case 'channel3':
            output = 'output test 3';
            break;