twitch.sk
1.0twitch.sk adds functions to Skript that allows you to request the Twitch API, and streamer status.
twitch.sk adds functions to Skript that allows you to request the Twitch API, and streamer status.
Dependencies:
- skript-mirror v1.0.0
- SkQuery v 3.6.5
- Skript
Example use case:
command /twitchstreamer <text>:
trigger:
checkTwitchChannelStreaming(arg-1)
while retrieveTwitchChannelStreaming(arg-1) is not set:
wait 1 tick
if retrieveTwitchChannelStreaming(arg-1) is true:
message "&7[&5&lTwitch&7]&r %arg-1% is live: https://www.twitch.tv/%arg-1%"
else:
message "&7[&5&lTwitch&7]&r %arg-1% is not live."
Functions:
checkTwitchChannelStreaming("myfavoritestreamer"):
Creates a check for the given twitch streamer. Result can be retrieved with this function:
retrieveTwitchChannelStreaming("myfavoritestreamer")
retrieveTwitchChannelStreaming("myfavoritestreamer"):
Returns the live status of the streamer, which is either true (streaming) or false (not streaming). You may want to use a while loop to wait until the request is done, since it happens in a thread:
while retrieveTwitchChannelStreaming("myfavoritestreamer") is not set:
wait 1 tick
set {_result} to retrieveTwitchChannelStreaming("myfavoritestreamer")
requestTwitchAPI("twitch api url you want to request"):
Request data from the twitch api, this is not threaded, be sure to run this function in a thread to not halt your game. Returns the result as json string.
Setup:
To setup this script, you need a twitch api client id, which you can get here . Add this id to the options to allow this script to access the twitch api.
Questions:
If you have any questions, join our Discord .
Similar projects
Script →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta