Twitch Bits - Get Top X Leaderboard

Description

Get info about your Bits Leaderboard on Twitch via their API, whether just for the top 3 or top 100 users of all time, or a certain period.

Import File

Twitch_Bits_Get_TopX_by_pwnyy.sb (6.8 KB)

Installation

In Streamer.bot click the Import button in the top menu. Drag the .sb file into the Import String field. This will give you an action called [Bits] Get TopX (max100).

Configuration

Argument Name Value Description
topAmount non-decimal number How many users from the leaderboard you want to get. Min. 1, Max. 100
period string/text Period of time that will be checked from current date. Valid Values: day, week, month, year, all
noUserText string/text Text which will be shown if no user is in that period
rankFormat string/text How each singular rank text will look like. User %rankPosition%, %rankUser% or %rankScore% in it.

Usage

You can use the action as is, or in combination with a command or as a Run Action subaction.

Generated Arguments

Argument Name Value Description
bitsPeriodStarted DateTime Start date of the period checked. Will be “/” if period was set to all
bitsPeriodEnded True/False End date of the period checked. Will be “/” if period was set to all
bitsTotalUsers int number Amount of users in the leaderboard
topBitsUsers string/text Text displaying the leaderboard
topBitsUsersObs string/text Text displaying the leaderboard for OBS text source
topBitsUsersFile string/text Text displaying the leaderboard for Write to File
topBitsUsersDict Dictionary<string,long> Dictionary with userId’s and scores of leaderboard
bitsTotal long number Total amount of bits spend by the leaderboard
includeBotAccount True/False Whether the bot account is included
bitRankUserId# string/text Twitch User Id. # is rank, starting at 1.
bitRankUserName# string/text Twitch Login name. # is rank, starting at 1.
bitRankUser# string/text Twitch Display Name. # is rank, starting at 1.
bitRankScore# long number Score/Amount of bits spend. # is rank, starting at 1.

Testing Phase Log

Version 1

  • Singular Action with defining topAmount, period, noUserText, rankFormat

Version 2

  • Adding topBitsUsersObs and topBitsUsersFile arguments