How to create a custom points leaderboard?

Hello everyone,

I would like to create my own points leaderboard. It’s supposed to take certain viewers input (Sub, Dono, Channel Points Reward, and others) and transform it into a value. This number creates a new entry in a leaderbaord or, in case the viewer already has an entry, adds this new number to the already existing entry. For example:

A viewer subed with a Tier 1 sub for 1 month = Viewer gets 500 points and is now on position X on the board.

The problem is: I am completely new to programing. So the last days I searched for a way to get the needed knowledge, but it’s hard to find something, when you don’t know the right words. So far it seems like, I need to make something called API and this website here has the section “Twitch Developer Documentation”, but all this new information is quite overwhelming. Also I have heard, that the Twitch API can’t work with donations, so it would be better to work with something like StreamLabs API or StreamElements API. But I don’t know, if this is true or false.

All in all: How can I realize my project? Where do I start? What do I need to know? Am I on the right way?

Thank you.

The basics on how to fetch and process data from an API.

This sounds like you are jumping in the deep end and have no prior knowledge of any programming language.

What you describe is fairly complex and this suggests you have no knowledge on how to fetch and process data.

Twitch isn’t a “tipping” or “donations” platform. (Tips go to streamers, donations go to charity).

So the correct api for “tips” will depend on whose system you are using.

Everthing else is just a matter of choosing one of the API notification methods, pubsub, eventsub, webhooks, chat, all provide real time data for channel point rewards(*), subs, bits usage etc.

(*) not all custom rewards notify chat.

First you need to decide what programming language to do, and learn the basics of that language, then you can move on to something more complicated such as API interaction.

Yes, I have no knowledge about fetching and processing data. First time I hear fetching as a word for programing.

Yeah, Tips is what I meant. I said Donation, because that’s what streamers I watch usually say.
Ok, so I should indeed not use the Twitch API, if I want to inclued “tips”.

I am currently watching a video with something simular to what I want to do. The streamer Michael Reeves created a program, which transformes a sub into a drill being activated for some secs. In the video he is using StreamLabs API and JavaScript. I heard of StreamLabs before from their leaderboard extension and JavaSript is also something I have heard before. So I would go with these.

Fetching from an API - the act of loading data from another place. Any word for obtaining data works. (There is also a basic web JS function called fetch that will literally do just that)

Then you need to learn the basics of Javascript

Code academy has some stuff here Learn JavaScript | Codecademy

But you are probably looking at NodeJS which is “server side” javascript.

Ok, I will see how far I can get over the holidays. If I have questions after the learning, I will come back here.
Thank you :slight_smile:

Hey, I’m back :slight_smile:

So I have finished the complete “Learn JavaScript” course and would like to start to code. In the video I mentioned in an older post, I saw that the software “Visual Studio Code” was being used. Should I use this or is there software that is better based on my low knowledge/based on what I want to do?

A text editor, is a text editor, is a text editor.

Use whatever makes sense to you that provides the features you need. Personally I use Sublime Text

I see XD
Ok, I will take a short look at both and see what speaks more to me. Thx


so I am trying to connect to streamlabs, but I am having trouble as to how I have to do it right. So far it looks like this:

const socketToken = '';

const streamlabs = io(`${socketToken}`, {transports: ['websocket']});

streamlabs.on('connect', () => console.log('Connected with Streamlabs'));

To get my token, streamlabs says I have to use this:

const fetch = require('node-fetch');

let url = '';

let options = {method: 'GET'};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));

But the programm says, that it can’t find the ‘node-fetch’ module.
Where do I get that module or am I just on the wrong way to get connected?

If you’re not familiar with the basics of installing and using modules I recommend watching some introductory YouTube videos or guides online.

Also, as for the specifics on integrating with the StreamLabs API, you should contact their support as they are a 3rd party and not part of Twitch.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.