Hayo, Roketto here. Welcome to the RokBot API homepage!

I wrote up a couple of fun scripts here that you can use in Nightbot commands. Below each script name and description is a template you can copy and paste into a Nightbot command. All that's left for you to do is fill out the required parameters as indicated. Watch out as there will be more scripts posted here over time!

Hello.php - Says "Hello" (among other possible greetings) to the command user. A tad useless since this can be achieved via the Nightbot $(user) variable, but this was a good way to practice using Nightbot request headers. By the way, because the script gets the command user from Nightbot's request header, only Nightbot can directly use this script from your stream chat. It means this script won't work if you try running it in your browser.

$(urlfetch https://rokbot.xyz/hello.php)

Length.php - Determines the length of a given phrase. You can, of course, do the same thing quite easily with Nightbot's $(eval) variable.

$(urlfetch https://rokbot.xyz/length.php?query=$(querystring))

Det.php - Computes the determinant of a 3 by 3 matrix (by cofactor expansion along the first row). Enter the entries as comma-separated.

$(urlfetch https://rokbot.xyz/det.php?query=$(querystring))

SMM.php - Makes Nightbot send multiple messages (up to 6) to your Twitch/YouTube/Discord chat. The i parameter is the delay in seconds (minimum 5) and the d parameter is whether to delay the second message or not (0 or 1). Just like Hello.php, SMM.php requires a Nightbot header to be passed, so only Nightbot can directly call this script from your stream chat. This means this script can't be run as is in your browser.

$(urlfetch https://rokbot.xyz/smm.php?msg=MESSAGE_1`MESSAGE_2`MESSAGE_3`MESSAGE_4`MESSAGE_5`MESSAGE_6&i=INTERVAL&d=0_OR_1)

DiscordMsg.php - Sends a message to your Discord server as a bot! WEBHOOK_URL is your Discord webhook, MESSAGE is your message to send, USERNAME is the bot username, PICTURE_URL is the picture you want for the bot avatar, enter true or false for tts, and SUCCESS_MESSAGE is the message for Nightbot to return upon a successful post.

$(urlfetch https://rokbot.xyz/discordMsg.php?url=WEBHOOK_URL&content=MESSAGE&username=USERNAME&avatar_url=PICTURE_URL&tts=TRUE_OR_FALSE&success_msg=SUCCESS_MESSAGE)

YTSubs.php - Gets a YouTube channel's subscriber count. CHANNEL_ID is the channel's ID, not its username.

$(urlfetch https://rokbot.xyz/ytsubs.php?id=CHANNEL_ID)