AnkhBot Command Spotlight — Week 1

Hello there, and welcome to the first instalment of my new blog series – AnkhBot Command Spotlight!  The intention of this is for me to share some of the more creative commands I’ve created with my bot with you, ranging from games to utilities to highlight time keepers!

To kick off the series, I’m going to be revealing how I’ve created two of my commands; !fight and !highlight.  That’s right Ankhbot users! You will now have the SAME highlight tracking capabilities of CoeBot users!  And a game on top of it, so take THAT!


Highlighting the awesome parts of your stream is something your viewers will appreciate a lot.  With this command, you’ll know exactly what they want to see!  Or you can simply use the command as yourself as a reminder to record the highlight.

Step 1: Create a file to store your highlights in

This is the simple part.  I recommend keeping all of your bot’s custom files in their own folder.  For the sake of this example, we’re going to create a Twitch folder in my documents C:\Users\xwater\Documents\Twitch (replace xwater with your own pc username).  Inside the twitch folder, create a empty text document called “highlight.txt”.  

Step 2: Create the new command in AnkhBot

Now, going into Ankhbot we’re going to create our new command.  We’ll call it !highlight but feel free to rename it yourself if you’d like.  In the response section, copy and paste the statement below (replacing directory information with your own directory)

$savetofile(“C:\Users\xwater\Documents\Twitch\highlight.txt”,”$user wants to highlight $game ~ $status at $uptime into the stream — $date $time”)

Game: Super Mario Maker
Title: Playing Viewer Levels all night long!
Chat: Xwater: !highlight

Xwater wants to highlight Super Mario Maker ~ Playing Viewer Levels all night long! at 1 hour 25 minutes 58 seconds into the stream – 12/03/2015 3:21PM

Easy as pie! Now your just assign the permissions as you like (I recommend Mod/Regular only to avoid spam/clutter in your file) and you’re good to go!  I throw a 2 minute cooldown on my command, because odds are you don’t need it activated in increments of 2 minutes.

Alternate command with user message

If you want to include a user message in your highlight command, just change the response to the following.

$savetofile(“C:\Users\xwater\Documents\Twitch\highlight.txt”,”$user wants to highlight $game ~ $status at $uptime into the stream because -$msg- ~ $date $time”)

Game: Super Smash Bros. for Wii U  
Title: Smash Saturday with Viewers!
Chat: Xwater: !highlight amazing comeback with Roy!!

Xwater wants to highlight Super Smash Bros. for Wii U ~ Smash Saturday with Viewers! at 3 hour 27 minutes 22 seconds into the stream because -amazing comeback with Roy!!- ~ 09/01/2015 9:54PM

And there you go! Now you can record your highlights without having to guess what time they happened at!

!fight game

This was the first customized game I created, and I’m quite happy with it.  It’s a very fun way for the viewers in your channel to interact and have fun with.  Essentially, it works something like this

(insert screenshot)

The cool part is that the verb and noun + description are randomly selected.  The amount of options for the bot to select from is completely up to you.  Let’s get started with the file preparation

Step 1: Creating your fight scenarios

Just like with the !highlight command, we’re going to be creating files for Ankhbot to interact with to make this game work.  I place my files in C:\Users\xwater\Documents\Twitch (replace xwater with your own pc username).  Inside the twitch folder, create two text documents.  One called “action.txt” and one called “verb.txt”.  Open up action.txt and copy the lines below into it


A noob tube.  NOT FAIR, BRO!
Their THUNDER…SMASH!!  It’s super effective, too!
A poison mushroom.  Are you trying to send $target on a bad trip or something?
a Laguna Blade!  I think $user had a scepter, too!
The Master Sword!  It’s the sword of evil’s bane, $user.  Did $target really do anything THAT bad to you?

Now, open up your “verb.txt” file and add the following lines into it




Step 2: Add the command to AnkhBot

The rest of the setup is actually incredibly simple!  Essentially, all we’re going to be doing is reading a random line from each of these files when a user triggers the command.  Create the !fight command and add the following to the response section

$user $readrandline(“C:\Users\xwater\Documents\Twitch\verb.txt”) $target with readrandline(“C:\Users\xwater\Documents\Twitch\action.txt”)


xwater: !fight AnkhBot
AnkhBot: xwater Reks Ankhbot with Their THUNDER…SMASH!!  It’s super effective, too!

That’s it! I would suggest putting a user specific cooldown on this command, I run mine with a cooldown of 2 minutes per user.  You don’t want the game to get old fast, so don’t let people overuse the command.  In my game I have about 20 verbs and 50 actions, which is a good starting point.  I wouldn’t launch the command with anything less than 25 action statements prepared.


If you found this article helpful, please leave a comment below!  Let me know what other kind of commands you’d like to see in AnkhBot.  I would love to hear any and all feedback you may have.


One Reply to “AnkhBot Command Spotlight — Week 1”

  1. Love the idea for this series! Even though I don’t stream, it’s still interesting to see how you actually created these commands 😀 And of course, it’ll definitely be helpful for other streamers that use AnkhBot too!

Leave a comment :D Come on do it!