I have tree new custom commands ideas but need someone to help me figure out how i can write them

So I have three commands that I would like to have on my twitch/YT streams.

  1. (!GameRequest) basically allows my viewers to come with some suggestions to games I can play

  2. (!StreamTime) shows how long i have streamed

  3. (!NextStream) shows how long it is until my next stream starts

I bet that all of these probably already exist, so I would really like some help with them :slight_smile:

!streamtime is easy as there’s !uptime for that.
$(twitch $(channel) “Stream uptime: {{uptimeLength}}”)

Game request, you’ll have to be more specific. Do mean by a poll or counter? Otherwise you’ll just have to check the chat and see what looks most popular.

!next stream I don’t think can be done because unless you have certain time that you stream everyday, nothing can predict when you stream. There are things that can be done to show when you start streaming though.
The best I can think of is a countdown timer for this but you’d have to know exactly when you’re streaming and alter it whenever your schedule changes.

You can make a simple command like this, but you would have to manually edit it with !commands edit !nextstream after every stream.

!commands add !nextstream Time until next stream: $(countdown 07 17 2017 05:00:00 PM US/Central)

Or if the date and time of your streams follow a pattern, you can adapt the code here Countdown for every wednesday - #6 by am_1 to have the command automatically calculate the next stream time.

1. For !GameRequest you could recycle the custom API Quote system:

2. For !StreamTime check @dpsp491’s response :slight_smile:

3. For !NextStream you can use 2 or 3 commands like this:

One command as a place holder for !nextstream:

!nextstream (Click me!)
!addcom !nextstream -cd=5 The next stream is planned in: Set

Another for you or your moderators to set !nextstream:

!setstream (Click me!)
!addcom !setstream -ul=moderator -a=!commands edit !nextstream The next stream is planned in: $(eval "$" + "(countdown $(query) GMT+1)")

//Syntax: !setstream Month Day Year 12-hour-Time am/pm
Note: *Don’t forget to change “GMT+1” to your timezone.

And one final optional command for your mods to set the stream to a: No streams planned.

!setstreamNone (Click me!)
!addcom !setstreamnone -ul=moderator -a=!commands edit !nextstream There is currently no stream planned.

  • The !setstream command will allow Moderators to set the time for the next stream with: !setstream [date].
  • Then Everyone can check the countdown, how long until the next stream with: !nextstream.
  • Alternatively you can change !nextstream to show there are no Streams set with: !setstreamNone.

Example: !setstream July 17 2017 12 am - Would set !nextstream to Game of Thrones season 7 premiere.


Note: You’ll have to use !setstream or !setstreamNone (depending) during or after each stream, but it works great :slight_smile: and doesn’t require you to edit a command’s code every time, just a quick simple !setstream date line.

Nightbot has a default function:
!poll new [topic] | [option 1] | [option 2] | [option 3]
https://docs.nightbot.tv/commands/poll

Hope this helps.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.