#Subathon subcount tracking: What gets tracked?

1 messages · Page 1 of 1 (latest)

tranquil kettle
#

Hi,
I built https://neuro.appstun.net/subathon/ to show the current subathon with automatic sub counting.
The problem is that the subcount on my page always differs from the subcount on stream. I'm not sure what Vedal tracks for his counter and in what channels/platforms.

I currently track normal subs, re-subs, subgifts & anonymous subgifts, and only on the main channel (vedal987).

Does anyone have more information which sub types or other gift thingies or other channels/platforms are tracked in the subcount on stream?

Look at the current Neuro-sama subathon details!

foggy scroll
#

also track bilibili subs, which are now worth slightly more too

tranquil kettle
#

not the jp twitch channel too?

tranquil kettle
#

now added bilibili sub (guard) tracking
every guard is +1 on the subcount (same as the other 4)

tranquil kettle
#

AwooHmm it still gets behind the streams subcount

foggy scroll
#

and 50, 500 respectively for tiers above that

tranquil kettle
#

OhISee i searched up the prices for the levels and holy - that's why you did it like that
its now updated. thanks for the info A_ShibaHeart

do you do the same with twitch sub tiers? like t1 = 1; t2 = 2 & t3 = 3 subs

humble flicker
#

T3 would be 5 in that case no? Because of price being 5x t1 sub

nimble ingot
#

I did a T3 sub during sleeping hours and it added 100 seconds

tranquil kettle
#

then t2 is the middle, so 3 subs each

foggy scroll
#

higher twitch tier subs add more time but don't count as more than one sub

#

it's a little inconsistent I made that system first

tranquil kettle
tranquil kettle
#

I think I did something wrong neurOMEGALUL

#

the subcount on stream is 31k ehehe

lament pawn
#

I noticed the sub count on the site is still a bit higher than on stream and the startTimestamp in your API is "Friday, 19 December 2025 18:52:43 GMT+00:00" but note that subs didn't start getting counted on stream until after the 30 minute intro and music video which was 34:21 after stream start

tranquil kettle
twilit pine
#

hidden goal revealed

#

vedal and evil duet

tranquil kettle
#

i guess this is now a discussion

nimble ingot
#

Here's every time the seconds per sub changed during the hype train

40k: +18s
50k: +12s
60k: +8s
80k: +6s
100k: +5s
120k: +3s
140k: +2s

tranquil kettle
#

thats interesting OhISee - but not needing it (only counting subs, not time)

tranquil kettle
#

the subcounts are currently 497 subs apart

this is the code that adds the subs to the subcount(s)

// Subscribe to an event users can trigger on Twitch
TwitchIrc.on("USERNOTICE", (msg) => {
  // check internal stuff if there is a stream, active subathon and correct streamer
  if (activeSubathons.size === 0 || !Twitchdata.isLive() || msg.channelName.toLowerCase() !== streamerNameLower) return;

  let subsTotal = 0;
  // Check what type the event is
  if (msg.isSubgift() || msg.isAnonSubgift() || msg.isResub() || msg.isSub()) subsTotal = 1;

  // Add the subs to the subcount in every active subathon entry
  if (subsTotal > 0) for (const sub of activeSubathons.values()) sub.subcount += subsTotal;
});

// Subcribe to the guard (sub) buy event
BilibiliWs.on("GUARD_BUY", (msg) => {
  // check internal stuff if there is a stream & active subathon (streamer/roomid (1852504554) get set on init, so no need to check)
  if (activeSubathons.size === 0 || !Twitchdata.isLive()) return;
  
  // Set the subs by guard level  
  let lvlSubs = 3;
  if (msg.data.data.guard_level == 2) lvlSubs = 50;
  else if (msg.data.data.guard_level == 1) lvlSubs = 500; // Updated - lvl 1 = highest

  // Calculated total subs
  let subsTotal = msg.data.data.num * lvlSubs;

  // Add the subs to the subcount in every active subathon entry
  if (subsTotal > 0) for (const sub of activeSubathons.values()) sub.subcount += subsTotal;
});

TwitchIrc uses @mastondzn/dank-twitch-irc and BilibiliWs uses tiny-bilibili-ws

#

please don't question why there can be multiple active subathons/why I use a list type (here Map/Hashmap).

tranquil kettle
#

how is it 168617? Shikiconfused stream says 154736

tranquil kettle
#

(forgot to write the stream sucount in line 1: its same as manual override)

tranquil kettle
foggy scroll
#

you have it the wrong way around I think, in bilibili api guard_level 3 is the regular captain and 1 is the 500x one

tranquil kettle
#

OhISee that's stupid