2022 Update
This is a long overdue update, but I have noticed that this guide still gets quite a bit of traffic, and the majority of the commands posted here are still getting copy/pasted elsewhere. While I think that's great, I felt like I should offer an update regarding the current status of my own personal usage of SLCB. Without diving too much into the drama of things, Streamlabs made some poor decisions in their development process of their fork of OBS, Streamlabs OBS, that came to light last year. If you're unfamiliar with what occurred, this Twitter thread by the OBS team will explain the TLDR. It is important to note that the OBS devs have since stated that they are now currently on good terms with the Streamlabs team. However, for someone such as myself who literally makes a living off of contributing and developing for open-source communities, I made my own personal decision to find an alternative bot to replace SLCB. I am in no way suggesting users to migrate from Streamlabs, and again, this decision was my own.
That said, the purpose of this update was to focus on two things: (1) I will obviously not be updating this guide in the future, and (2) the commands here still work, but there are simply better ways to achieve what these commands give by using more modern commands/bots.
If you are interested in alternatives to Streamlabs, I believe the most user-friendly would be StreamElements. And for a slightly less user-friendly experience but powerful option, there is the bot I currently use, Streamer.bot.
Streamlabs Chatbot (SLCB), formerly known as AnkhBot, is a self-hosted bot solution developed by AnkhHeart for Twitch streamers with a number of unique features, as well as now officially integrates with Streamlabs and its exclusive services. Not to mention the software and all of its features are completely free.
There's numerous resources for learning how to utilize the bot to its fullest potential, but this documentation is an attempt at an all in one, quick and simple source for getting started and beyond. It's also important to note that a lot of these commands use an external API, coded and provided by the user Decicus that would otherwise be impossible to do with the bot alone.
If there's one thing I can't recommend more, it's to join their Discord server. You can find support there, as well as community made addons for the bot.
These are the most common commands that you see in other streamer's channels, and they are 100% copy and paste friendly.
This retrieves and displays all information relative to the stream, including the game title, the status, the uptime, and the amount of current viewers.
Command: !stats Response: Game: $mygame | Title: $mystatus | Uptime: $uptime | Viewers: $readapi(https://api.crunchprank.net/twitch/viewercount/$mychannel)
This returns the duration of time that the stream has been live. If the stream is not live, it will return OFFLINE.
Command: !uptime Response: $mychannel has been live for $uptime.
This returns the local time for the streamer.
Command: !time Response: The time is currently $time for $mychannel.
This returns the date for the streamer.
Command: !date Response: The date is currently $date for $mychannel.
This lists the top 5 users who have the most points/currency.
Command: !top5points Response: The top 5 users based on points: $toppoints(5)
This lists the top 5 users who have spent the most time, based on hours, in the stream.
Command: !top5time Response: The top 5 users based on hours: $tophours(5)
This returns a numerical value representing how many followers you currently have.
Command: !followers Response: $mychannel currently has $readapi(https://api.crunchprank.net/twitch/followcount/$mychannel) followers.
This returns the date and time of which the user of the command followed your channel.
Command: !followed Response: $tousername, you followed $mychannel on $readapi(https://api.crunchprank.net/twitch/followed/$mychannel/$touserid).
This returns the "time ago" that the user of the command followed your channel.
Command: !following Response: $tousername, you have been following $mychannel for $readapi(https://api.crunchprank.net/twitch/followage/$mychannel/$touserid?precision=3).
This returns the date and time of when a specified Twitch account was created.
Command: !created Response: The account for $tousername was created on $readapi(https://api.crunchprank.net/twitch/creation/$touserid). Example: !created crunchprank
This grabs the last 3 users that followed your channel and displays them in chat.
Command: !recentfollowers Response: Welcome to our 3 most recent followers: $readapi(https://api.crunchprank.net/twitch/followers/$mychannel?count=3&direction=desc)!
This displays your latest tweet in your chat and requests users to retweet it. This only works if your Twitch name and Twitter name are the same.
Command: !retweet Response: Please retweet my recent tweet! $readapi(https://api.crunchprank.net/twitter/latest/$mychannel?no_rts&url)
This provides an easy way to give a shout out to a specified target by providing a link to their channel in your chat.
Command: !shoutout Response: Please go check out $targetname at $url - I love them and you should too! Example: !shoutout crunchprank
This returns all channels that are currently hosting your channel (if you're a large streamer, use with caution).
Command: !hosting Response: Thanks to all the users currently hosting: $readapi(https://api.crunchprank.net/twitch/hosts/$mychannel?implode).
These commands show the song information, direct link, and requester of both the current song and the next queued song. For users using YouTube for song requests only.
Command: !song Response: Current song: $currentsong - https://www.youtube.com/watch?v=$readapi(https://api.crunchprank.net/youtube/videoid?search=$currentsong) Requested by: $requestedby Example: !nextsong Response: Next song: $nextsong - https://www.youtube.com/watch?v=$readapi(https://api.crunchprank.net/youtube/videoid?search=$nextsong) Requested by: $nextrequestedby
This lists all BTTV emotes for your channel.
Command: !bttv Response: Check out all the BTTV emotes for $mychannel! $readapi(https://api.crunchprank.net/bttv/emotes?channel=$mychannel)
This allows one user to give a specified currency amount to another user.
Command: !give Response: $givepoints("$userid","$targetid","$num2","$username gave $value $currencyname to $targetname","fail","false") Example: !give woahh_jess 5 Explanation: 5 points are removed from user of the command and given to woahh_jess
This gives a specified amount of points to all users currently in chat.
!points add +viewers <amount>
The following commands take use of AnkhBot's $readapi
function. Basically it echoes the text of any API query to Twitch chat. Some of these commands have optional parameters that can help you customize your query results which I have noted for each command - be sure to play around with those.
$readapi(https://api.crunchprank.net/twitch/followage/CHANNEL/FOLLOWER)
precision
: How precise the timestamp should be in terms of years, months, weeks, days, hours, minutes & seconds (default: 2).$user has been following the channel for $readapi(https://api.crunchprank.net/twitch/followage/crunchprank/$user?precision=3).
yourfrienddustin has been following the channel for 1 month, 3 days, 19 hours.
$readapi(https://api.crunchprank.net/twitch/followed/CHANNEL/FOLLOWER).
tz
- By default this query will output the result in UTC. However if you'd like to change the time zone, you can specify using the PHP list of all available time zones, check here.$user started following on $readapi(https://api.crunchprank.net/twitch/followed/crunchprank/$user?tz=America/New_York).
yourfrienddustin started following on Jun 07. 2016 - 05:57:21 PM (America/New_York).
$readapi(https://api.crunchprank.net/twitch/followers/CHANNEL)
count
- How many followers to get with the request (default: 1 | max: 100).offset
- How many followers to offset from the beginning of the object.direction
- What direction to retrieve followers in. Can either be 'asc' (oldest) or 'desc' (most recent). The default is 'desc'.num
- Prefixes each follower with a number.Everyone welcome our 3 most recent followers: $readapi(https://api.crunchprank.net/twitch/followers/crunchprank?count=3&direction=desc).
Everyone welcome our 3 most recent followers: woahh_jess, z0mbyte, yourfrienddustin.
$readapi(https://api.crunchprank.net/twitch/creation/USER).
tz
- By default this query will output the result in UTC. However if you'd like to change the time zone, you can specify using the PHP list of all available time zones, check here.The account for $user was created on $readapi(https://api.crunchprank.net/twitch/creation/$user?tz=America/New_York).
The account for crunchprank was created on Dec 26. 2013 - 09:31:06 PM (America/New_York).
$readapi(https://api.crunchprank.net/twitch/accountage/USER).
precision
- How precise the timestamp should be in terms of years, months, weeks, days, hours, minutes & seconds (default: 2).The account for $user was created $readapi(https://api.crunchprank.net/twitch/accountage/$user) ago.
The account for crunchprank was created 3 years, 4 months ago.
$readapi(https://api.crunchprank.net/twitch/highlight/CHANNEL).
"Hunter" LuL - https://www.twitch.tv/videos/231566911
$readapi(https://api.crunchprank.net/twitch/upload/CHANNEL)
Evil @ Twitchcon 2017 - https://www.twitch.tv/videos/182630172
$readapi(https://api.crunchprank.net/twitch/hosts/CHANNEL)
display_name
- If specified, this will use the display names instead of the usernames of the users that are hosting.list
- If specified, the list will be in plaintext (using newlines) instead of in a JSON object.implode
- If specified, the list will be returned comma-separated (", ") instead of JSON/a "newlined" list.Thanks to all the users currently hosting: $readapi(https://api.crunchprank.net/twitch/hosts/crunchprank?implode).
Thanks to all the users currently hosting: woahh_jess, yourfrienddustin, z0mbyte.
$readapi(https://api.crunchprank.net/twitch/subscriber_emotes/CHANNEL)
bobrossDealWithIt bobrossGold bobrossGG bobrossPal bobrossCanvasH bobrossBeli bobrossEve bobrossBush bobrossKappaR…
$readapi(https://api.crunchprank.net/twitch/team_members/TEAM)
sort
- If this is specified, it will sort the members of the team alphabetically.implode
- If this is specified, the list will be returned in plaintext compared to a JSON array (use a +
for space).Make sure to check out all the members of the Next Level team: $readapi(https://api.crunchprank.net/twitch/team_members/nextlevel?implode=,+).
Make sure to check out all the members of the Next Level team: 360chrism, fuzzyness, nospimi99, redfalcongames, chrescendo, vespher, raysfire, theno1alex.
http://multitwitch.tv/CHANNEL/$targetid
!multi
, then a user would type !multi user1/user2/user3
etc which would generate a link like: http://multitwitch.tv/CHANNEL/user1/user2/user3
.
The following commands take use of AnkhBot's $readapi
function the same way as above, however these are for other services than Twitch.
$readapi(https://api.crunchprank.net/twitter/latest/USERNAME)
no_rts
- If specified, retweets will not be included.include_replies
- no_exclude_replies
- Works similarly to include replies, except this query string cannot be specified as just empty unlike include replies.search
- Goes through each of the latest tweets (up to 200) and then searches with the specified string (case-insensitive). If this is not specified, it will just return the latest tweet.strict
- This is used together with search. If specified, it will do a case-sensitive search.url
- If specified, the URL of the tweet will be appended to the result.shorten
- Used together with url. Shortens the URL using TinyURL.howlong
- Includes the time since the tweet was posted.Retweet my latest tweet: $readapi(https://api.crunchprank.net/twitter/latest/crunchprank?url).
yesterday i ate captain crunch, salt and vinegar chips, and pizza. today the roof of my mouth is non-existent. - https://twitter.com/crunchprank/status/821484732324188161
$readapi(https://api.crunchprank.net/youtube/videoid?search=TERM)
show_url
- Prepends https://youtu.be/
before the video ID to make it a proper URL.7rs6HuJj4TE
$readapi(https://api.crunchprank.net/youtube/latest_video?user=USER) or $readapi(https://api.crunchprank.net/youtube/latest_video?id=USERID)
user
- For users with usernames in their URL.id
- For users with an ID number in their URL.skip
- Skips the specified amount of uploads (default: 0, maximum: 50).Check out my latest YouTube video: $readapi(https://api.crunchprank.net/youtube/latest_video?user=devinsupertramp).
DevinSuperTramp BIGGEST FAILS 2.0! - https://youtu.be/rW_NzxoNK1Y
$msg: $readapi(http://jwd.me/twitch/api/urban-dictionary.php?q=$msg)
!urban word
to get the Urban Dictionary's definition of that word.The following commands are to be used for specific games to retrieve information such as player statistics.
$readapi(https://2g.be/twitch/Overwatch/command/action=$target&bot=ankhbot&user=$username&console=$target3&channel=$mychannel&defaultconsole=pc&gamertag=$target2)
!overwatch action username platform
. So for example if I wanted to check my Kill/Death ratio and I play Overwatch on PC, I would issue !overwatch kda crunchprank-1234 pc
. If I wanted to check the same thing, but my account was in Europe, I would need to type !overwatch kda crunchprank-1234-eu pc
. If I played on a console such as PS4, then there's no need for a Battletag or region and would look something like this !overwatch kda crunhprank ps
. $readapi(https://2g.be/twitch/Overwatch/command/action=$target&format=twitch&user=$username&bot=ankhbot&console=XX&channel=$mychannel&gamertag=USERNAME-XXXX&hideBnetID)
console=XX
and gamertag=USERNAME-XXXX
will need to be changed to whatever Overwatch player you want the command to check by default for and what platform they are playing on. So if I wanted to only allow viewers to check the PC stats for woahh_jess
, I would make sure that those parts were changed to console=pc
and gamertag=woahh_jess-1234
. If woahh_jess' account was in Europe, then I would change the gamertag portion to gamertag=woahh_jess-1234-eu
. If for PS4, I would change them to console=ps
and gamertag=woahh_jess
. Once you have set up the response correctly, all a user would need to do is type for example !overwatch time
and that would return the "time played" for the player you specified in your response.