Does the API provide a way of determining how many bits a user has given to a channel?

I believe you can also use the PubSub to see user stats when they send bits.

The page I am referring to is here.

The example given in that page is below and you will note the line ‘total_bits_used’ - you could use that to determine total bits provided. Using the badge is only useful for a general approximation, if the user even chooses to show it, and whenever they send a message vs when bits specifically are sent.

{
   "type": "MESSAGE",
   "data": {
      "topic": "channel-bitsevents.44322889",
      "message": {
         "user_name": "dallas",
         "channel_name": "twitch",
         "user_id": "44322889",
         "channel_id": "12826",
         "time": "2015-12-19T16:39:57-08:00",
         "chat_message": "Omg that baneling bust was Kreygasm cheer10 cheer10 cheer100",
         "bits_used": 120,
         "total_bits_used": 620,
         "context": "cheer"
         }
   }
}
1 Like