Nightbot Documentation (DEPRECATED)

The Nightbot API has been deprecated, see post below by @KSib for more details.

If you run Nightbot on your Twitch channel, you can setup the following commands to display Chrono’s daily deal.

Installation

To install these commands, sign in to your Nightbot dashboard and click on Commands > Custom in the menu on the left, then click the + Add Command button to begin creating the custom commands.

The first step to creating your custom command is to give it a name. In the Command field, enter the text that, when entered into your chat, will trigger the message. We recommend !chrono.

Once you’ve given the command a name, you now have two options for determining the message’s content:

Default Message

If you don’t want to customize the message, paste the following into the Message field:

$(urlfetch https://api.chrono.gg/nightbot)

This will display a message in your chat with the game title, price in USD, percentage discount, and site link.

Example
Broforce is only $5.50 (50% off) at https://www.chrono.gg

Warning
The default message format DOES NOT include a personalized Chrono.gg affiliate link

Custom Message

If you’d like to customize the message, paste the following into the Message field:

$(urlfetch https://api.chrono.gg/nightbot?template=)

This message can be customized by writing anything you’d like after template=. You can also use the following tokens to add information about the daily deal to your message:

{name} - The name of the game. Example: Broforce
{price} - The price of the game in USD. Example: $5.50
{discount} - The sale discount in percent. Example: 50%
{timeLeft} - The time left in the sale. Example: 17 hours

Here’s an example of the type of message you can create and how it would display:

Message

$(urlfetch https://api.chrono.gg/nightbot?template=Chrono's deal of the day is {name} for only {price}, that's {discount} off! Hurry, the sale ends in {timeLeft} so grab it at https://www.chrono.gg/affiliatename!)

Display
Chrono’s deal of the day is Broforce for only $5.50, that’s 50% off! Hurry, the sale ends in 17 hours so grab it at Chrono.gg - One game. One amazing deal. Every day at 9AM Pacific.!

2 Likes

Since the current API endpoint for Nightbot is down, there’s now one you can use in the meantime.

Instead of the above urlfetch, use this:

$(urlfetch https://unofficialchronoapi.azurewebsites.net/getdeal?template=Chrono's deal of the day is {gameName} for only {salePrice}, that's {discount} off! Hurry, the sale ends in {timeLeft} so grab it at https://www.chrono.gg/AFFILIATENAME !&partnerName=AFFILIATENAME)

{gameName} - The name of the game. Example: Broforce
{salePrice} - The sale price of the game in USD. Example: $5.50
{discount} - The sale discount in percent. Example: 50%
{timeLeft} - The time left in the sale. Example: “in about 13 hours”
AFFILIATENAME - Replace in BOTH places with your own partner tag

Example output:
Chrono's deal of the day is Hacktag for only $8.00, that's 60% off! Hurry, the sale ends in less than 60 MINUTES so grab it at https://www.chrono.gg/AFFILIATENAME !

If you decide to just use the following, without the template then your link will not be personalized with your referral link:
$(urlfetch https://unofficialchronoapi.azurewebsites.net/getdeal)

Example output:
Chrono's deal of the day is Hacktag for only $8.00, that's 60% off! Hurry, the sale ends on August 28 at 9:00 AM Pacific (in about 13 hours) so grab it at https://www.chrono.gg !

Note:
In the event that for some reason it can’t contact the chrono api to get the data it needs, it will just post a simple message like this:
If you like what you see, please support me on https://www.chrono.gg/AFFILIATENAME :) Thanks!

4 Likes