[Node Js] Get the last follow, sub and cheers

Followers are not sent through the IRC so therefore tmi.js cannot react to it. It does react to subscription and cheers using these events:

  • Subscription - Username has subscribed to a channel.

    client.on("resub", function (channel, username, months, message, userstate, methods) {
        // Do your stuff.
    });
    
  • Resub - Username has resubbed on a channel.

    client.on("subscription", function (channel, username, method, message, userstate) {
        // Do your stuff.
    });
    

For followers you will need to use the Twitch API yourself. Either Kraken v5 or the new Helix.