My bot was firing on every event just fine a couple weeks ago, everything was solid. Right about the time that sub gifting was implemented, the bot stopped detecting ANY new subs, to include paid tier subs and gifted subs. (It never acknowledged gifted subs under the subscription event, even when it did work.) client.on('subscription'
no longer works at all. Resubs are fine. Cheering is fine. All other events seem to function with no issues at all. I hadn’t made any changes to the bot around that time. Has anything in the system changed with the subscription event specifically, or is something likely just amiss within my code?
Here’s the entire section:
var tmi = require('tmi.js');
var options = {
options: {
debug: true
},
connection: {
cluster: "aws",
reconnect: true
},
identity: {
username: "forbidinjustice",
password: "oauth:redacted"
},
channels: ["channelone","channeltwo"]
};
var client = new tmi.client(options);
client.connect();
client.on('subscription', function (_channel, username, method, message, userstate) {
let channel = _channel.slice(1);
let output = '';
switch(channel) {
case 'channelone':
output = "Thanks for subscribing to Channel One!";
break;
case 'channeltwo':
output = "Thanks for subscribing to Channel Two!";
break;
}
if(output) client.say(channel, output);
});