You have probably seen people on Twitch type the !uptime command on someone’s channel and seen it return how long they have been live. This can be really interesting for viewers especially if you are doing something like a 24-hour stream or charity event.

In this tutorial, I am going to show you how to set up the Uptime command using the nightbot bot. Let’s jump in and get started.

How To Set Up !UpTime Command On Twitch

To set up the Uptime command on your Twitch channel you will need to use a third-party bot. In this tutorial, we will be using nightbot. If you haven’t already created a nightbot account head over to Nightbot and create one.

Step 1 – Mod Nightbot

To ensure that night bot works on our channel we will have to first mod Night bot in our chat. This allows it to pull the necessary information from your channel and return it in chat.

To mod night bot head over to Twitch and open you Twitch channel. To do this navigate to your Profile Picture –> Creator Dashboard –> Chat Box.

In the chat box type /mod nightbot

This will mod the Night bot chatbot in your chat allowing you to use commands in your stream.

Step 2 – Add A Custom Command In Night Bot (Uptime)

In Night bot navigate to Commands –> Custom –> Add Command.

We now have to create our command. There is a few different options we need to fill in.

Command – This is what your viewers will type in to activate the command. For up time put !Uptime in this box.

Message – In the message section, we need to add some code to return our up time for the stream. I have added the code for you below to copy and paste. Just replace [CHANNELNAME] with your twitch channel username and paste it into the Message section.

$(urlfetch https://beta.decapi.me/twitch/uptime/[CHANNELNAME])

Userlevel – This determines who can use the command. For this command, we can set this to everyone.

CoolDown – I recommend setting this to around 60 seconds so people don’t spam it in chat.

Alias – You can leave this blank.

We can now test the command in our stream.

Step 3 – Test The Command

To test if your command is working head over to your channels chat and input the !uptime command.

You can see below that mine returns how long I have been offline as I haven’t streamed in a while. If you are live it will show how long you have been live.

Can I Use The Uptime Command On Youtube

If you stream on youtube you should also be able to use the uptime command as long as you are logged into nightbot with your Youtube account. You may need to adjust the code to return data from youtube rather than Twitch.

Wrapping up

You should now have the popular uptime command enabled on your Twitch stream allowing users to view how long you have been streaming or how long you have been offline.

Read More From Get On Stream:

Author

Write A Comment