Subscriber Count (Twitch)
Occasionally, I see a lot of people asking for the “subcount” and I decided to write a little script that easily shows how many subscribers a streamer has which can be put into a command. Only certain bots supports this (as far as I know), and two of which are Nightbot and Ankhbot. This obviously requires you to have a “Subscribe” button, but it also requires you to authenticate with my application.
Step #1
- If you are a partnered/affiliated streamer with a subscribe button:
- Follow this link and authenticate: https://decapi.me/auth/twitch?scopes=user_read+channel_subscriptions&redirect=subcount.
- If you are a moderator for a partnered/affiliated streamer, the streamer has to authenticate via https://decapi.me/auth/twitch?scopes=user_read+channel_subscriptions&redirect=subcount before you go to step #2.
Step #2
- Add the command to your bot using the "API" variable.
- The URL is: https://decapi.me/twitch/subcount?channel=CHANNEL_NAME
- Replace "CHANNEL_NAME" with the authenticated channel name.
- Command result examples:
- These examples are setup to display a similar message to this: "Subscriber count: 1337 <3"
- Nightbot:
Subscriber count: $(urlfetch https://decapi.me/twitch/subcount?channel=CHANNEL_NAME) <3
- ALTERNATIVELY: Nightbot has this built-in, if the Twitch streamer has logged into the Nightbot dashboard recently. You can use this instead:
Subscriber count: $(twitch subcount) <3
- Ankhbot - Requires latest version (R2):
Subscriber count: $readapi(https://decapi.me/twitch/subcount?channel=CHANNEL_NAME) <3
If you found some use out of this, I would recommend my post about custom APIs, which covers this and many more scripts that might be useful to have in your bot.