Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Nightbot commands reference for Twitch and sometimes youtube gaming. Most are accessible via google and reading many docs but I like to keep things in one location for reference. If you want to see something here lmk on Twitter: https://twitter.com/chuckreynolds or comment below.

Add, Edit, Delete Commands

  • !addcom !keyword New text here
  • !editcom !keyword Edited version of the text here
  • !delcom !keyword

Reference the user whom entered command

  • $(user)

Reference user-entered text

  • $(query)

Add an alias for another command

!addcom !newkeyword -a=!currentkeyword $(query)

Add a !shoutout (or !so) command for mods to reference other streamers

!addcom -ul=moderator !shoutout Check out $(touser) at twitch.tv/$(touser)

  • Usage: !shoutout username
  • Some ppl like to use !so but I have both and alias so->shoutout. nbd.

Time commands example to show your current time

!addcom !time Clintus lives in Arizona USA. Time there is currently $(time US/Arizona "HH:mm z") [or $(time US/Arizona "h:mma")]

Time countdown example

!addcom !24 24 Hour Stream Status: $(countdown Mar 13 2018 03:30:00 PM America/Los_Angeles) remaining!

Follow Age / Following Since (via 2g.be)

!addcom !followage $(urlfetch https://2g.be/twitch/following.php?user=$(touser)&channel=$(channel)&format=mwdhms)

Tweet the stream command

!addcom !tweet Click here to tweet & promote the stream! $(tweet Come watch @YOURTWITTERHANDLE play $(twitch $(channel) "{{game}} on Twitch! {{url}}"))

  • ONLY change the "YOURTWITTERHANDLE" and that message before the $(twitch part... dont touch the {{game}} or {{channel}} as those are variables that Twitch will fill in automagically.

Setup a command for LMGTFY (let me google that for you)

!addcom !lmgtfy Let Me Google That For You $(touser) http://lmgtfy.com/?q=$(querystring)

  • Usage is like this: !lmgtfy @username text to google

Setup a !multiset command to auto-update !multi for multiple twitch stream viewer

  • This will overwrite anything you currently have in !multi so heads up
  • First add !multi: !addcom !multi Multi-stream link:
  • Next add !multiset command for mods+ only !addcom !multiset -ul=moderator -a=!commands edit !multi Multi-stream link: http://multitwitch.tv/$(channel)/$(query) (or use http://kadgar.net/live/ instead)
  • Usage: Never touch !multi, just do !multiset otherchannel and it'll append it to the url/yourchannel. For multiple streamers just do this: !multiset channel2/channel3/channel4 etc.

Game specific stuff

Fortnite wins (via 2g.be)

!addcom !fortnite YOURNAME's Fortnite BR Stats: $(urlfetch https://2g.be/twitch/Fortnite/command/query=solowins%20YOURNAME&default_platform=pc&notext) $(urlfetch https://2g.be/twitch/Fortnite/command/query=duowins%20YOURNAME&default_platform=pc&notext) $(urlfetch https://2g.be/twitch/Fortnite/command/query=squadwins%20YOURNAME&default_platform=pc&notext) See all stats here: https://fortnitetracker.com/profile/pc/YOURNAME

  • Initially xgerhard set this up for query commands, I changed it to only respond w/ a certain users info but the bot didn't like this. Xgerhard setup the &notext var to turn off the username response. I'd like more customizability but it's a good start
  • Obviously change "YOURNAME" to your Fortnite username. reference
  • Also PC is default_platform=pc... change pc to ps for PS4, or xbox for Xbox.

General Code Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment