Twitch Subscription Tracker

This script tries to track the total amount of subscriptions commited to the channel and the amount of gifted subscriptions gifted to others a viewer has done, both with individual tier tracking records as well.

Due to small limitations of Streamlabs Chatbot Python Scripts the chatbot must be connected to the chat and the viewer needs to share his or her subscription as this script is getting the info about a subscription form the Twitch IRC.

On a subscription or gift this script will automatically update or add the viewer to the database with information it has at hand. For gifting it can only know the the targets tiers gift and for subscribing it can detect a resub or a new sub. If a resub is shared and that viewer is not yet in the database, all prior concecutive months (minus 1) are considered tier 1 ($5) and the last newest month is added to its respective tier. If this is incorrect however manual adjustment is needed with build in chat commands to edit the database entries to the right values. See further down below in this readme for the command and its usage. Also if a viewer has manually be added but total months is lower than the concecutive months the viewer has on resubscribing the script will automatically adjust the total months by adding missing months to tier 1.

Name changes are automatically updated when the user (re)subscribes to the channel. The usuable command parameters, pull out data from the database to be used as command or currency response, use the username to identify the viewer. So if a viewer that is in the database, did a name change, and not yet shared his or her resubscription the values returned are 0.

The script logger (the [i] button under Scripts) will be used to show a status message on success or failure on the automated database updating. If any failures did happend, manual editing/adding the viewer is required.

All info is stored into a sqlite database that can be viewed or edited by third-party programs like DB Browser (http://sqlitebrowser.org/) but the chatbot has control over this database file as long as the chatbot is running. If you use above mentioned program to edit the database contents make sure you make the total months equal to all tier months added and you commit changes to actually write back the changes to the database file.

Note: To simplify the script allot Prime subs are considered Tier 1 subs the same as a $5 subs. In reallity this should not matter as they are the same for the caster in terms of value.

Parameters, Commands, Top Lists & Gifting Data

All of these information are included into the Readme.txt.

Changelog

  • v1.0.3
    • Fixed bug in $tstTopGifters displaying subbed months instead the number of gifted subs. Fixed Readme button and udpated Readme itself
  • v1.0.2
    • Adjusted chat output for chatbot version 1.0.2.29
  • v1.0.1
    • Bugfix on updating existing user in the database
Twitch Sub Tracker
Ver.: 1.0.3 | Downloads: 42
  • Scriptname: Twitch Sub Tracker
  • Author: Ocgineer
  • Last Update: 2018-02-27
  • Website: twitch.tv/ocgineer
  • updatenotifierv2