User Tools

Site Tools


custom_commands

Custom Command Variables

This is a list of all available custom command variables.

Looking for community-made commands/mini-games?

Table of Contents


Regular Command Variables


DeepBot allows you to use custom commands in the channel messages module that allow you to deliver dynamic content to your viewers.

Listed below are the set of custom commands available with DeepBot. Feel some more are needed? Head over to the Feature Requests section on the forums and make a post.

Variable Info
@btag@ Shows the battle tag of the user.
@cmdstatus@[!command] Checks if a command is enabled or disabled.
@cost@ Tells the user how much it costed if the command was executed.
@counter@ Counts the number of times a command has been executed successfully.
@customapi@[InsertAPIURLHere] Use your own custom API. Include the brackets when making the command. (See the examples below.)
@disablecmd@[!command] Disables a command.
@discordinfo@[username] Retrieves the user's Discord name or ID. e.g. @discordinfo@[expertsonline] or @discordinfo@[@user@,id]
@enablecmd@[!command] Enables a command.
@escrow@ Gets the number of points the user has currently placed in bets, raffles, and mini-games.
@followers@ Total number of users following the channel.
@game@ Displays what is currently being streamed in the channel.
@getcounter@[!command] Grabs the counter of a command. (E.g. mods use !adddeath, while users use !death which can use @getcounter@[!adddeath].)
@hours@ Total number of hours the user has been watching the stream.
@hrstolevelup@ Number of hours until the user reaches the next stream rank.
@intpoints@ Pulls points without the thousands separator.
@joindate@ The date the user first joined the channel.
@mkdir@[pathname] Custom variable to allow 'custom logs' sub directories to be created, useful for initialising custom commands and games. e.g. @mkdir@[games/users/@user@].
@nextrank@ Shows the next stream rank.
@points@ Displays the user's points.
@pointsname@ Name of the channel currency.
@pointstolevelup@ Number of points until the user reaches the next stream rank.
@randomuser@ Picks a random user currently in the channel.
@remotesound@[delay,url] Plays MP3 files hosted on websites.
@slabspoints@[check|@user@] Command to get the points on the Stream Labs platform.
@slabspoints@[deposit|@user@|20|1] Command to deposit 20 points into the Stream Labs platform. The last parameter is the multiplier, e.g. use 0.99 to add a 1% transfer fee. Returns “Success” if the transfer is successful.
@slabspoints@[withdraw|@user@|20|1] Command to withdraw 20 points from the Stream Labs platform. The last parameter is the multiplier, e.g. use 0.99 to add a 1% transfer fee. Returns “Success” if the transfer is successful.
@setcounter@[!command|number] Sets the counter of a command. (E.g. mods use !adddeath which can use which can use @setcounter@[!death|10], while users use !death.)
@streamrank@ Displays the user's stream rank.
@target@ Grabs anything after the initial command. First parameter of channel message. (E.g. Message : http://twitch.tv/@target@, "!twitch experts" will display http://twitch.tv/experts)
@target@[1] Similar to @target@, but you can specify multiple targets and have them placed wherever you like. (E.g. @target@[1] hit @target@[2], “!hit Expertsonline RepentGamingTV” will give a message Expertsonline hit RepentGamingTV)
@target@[1|20] Grabs an array of targets. (E.g. !name My name is Bob | @target@[1|4])
@time@ Displays the current time on the computer the bot is hosted using the 12-hour clock.
@time24@ Displays the current time on the computer the bot is hosted using the 24-hour clock.
@title@ Displays the current stream title.
@uptime@ Shows the total amount of time the stream has been live (calculated by Twitch).
@uptime2@ Similar to @uptime@, except the total time is self-computed by DeepBot, with grace period for crashes/disconnects.
@user@ Displays the username of the person who executed the command.
@userclass@ Displays the class of the user. In order of priority; [Streamer, DeepBot, VIP Gold, VIP Silver, VIP Bronze, Mod Level 2, Mod Level 1, Viewer]
@viewers@ Current number of viewers watching the stream.
@viprank@ Displays the VIP rank of the user.

VIP-Exclusive Command Variables


Variable Info
@calc@ Use operators to calculate mathematical equations. @calc@[op|num1|num2] , Available operations (+,-,*,/). E.g. @calc@[+|5|4].
@ctrt@ Generates a link to retweet a tweet. E.g. Support the stream by retweeting! @ctrt@[658476806278881281]
@ctt@[InsertCustomTweet] This generates a link to tweet out a custom message specified. E.g. Support the stream by tweeting! @ctt@[Check out expertsonline @ http://twitch.tv/expertsonline playing @game@]
@customjsonapi@[URL,field] Custom API support to get parts of a JSON object. For example to get the status for a channel using user input - @customjsonapi@[https://api.twitch.tv/kraken/channels/@target@[1],status] (Note Twitch API requests now require you to pass a Client ID along with your request. See https://blog.twitch.tv/client-id-required-for-kraken-api-calls-afbb8e95f843#.qvtr401fh for more info)
@datetime@[format] Formatted date/time output. Formatting Details : https://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
@editpoints@ Silently edits users' points in chat. Only runs when the command that includes this variable has User (Elevated Access) selected. E.g. @editpoints@[@user@|10]
@exec@ Chains one or more commands from a single command. E.g. @exec@[5,!bot] will run !bot after 5 seconds.
@followdate@ Displays the date the user followed the channel.
@if@[data||matchWith||matchedResult||FailResult] An if-then statement that compares data and gives a response if it matches or not.
@if@[data||matchWith||matchedResult] Data is returned if match fails.
@if@[operator||value1||value2||success||fail] Success if value1 operator value2 is true. Supported operators are: >, >=, <, and ⇐. (e.g. @if@[>||@rand@[0|100]||75||You win!||You die!]
@isnumber@[number] Checks if the input is a number.
@isnumber@[+|number] Checks if the input is a positive number. Use - to check for negative numbers.
@isonline@[user] For checking if the user is currently in chat.
@last5follows@ Displays the last 5 users who followed the stream. (Also works for timed messages)
@last10follows@ Displays the last 10 users who followed the stream. (Also works for timed messages)
@lastseen@ Shows when a user was last seen talking in the channel.
@lookupinfo@[var,user] Displays info of a user. (Requires variable names to start with l_) e.g. @lookupinfo@[@l_points@,expertsonline]
@l_btag@ Show the battle tag for the user. @lookupinfo@[@l_btag@,expertsonline]
@l_followdate@ Displays the date the user followed the channel.
@l_hours@ Total number of hours the user has been watching the stream.
@l_lastseen@ Shows when the user was last seen talking in the channel. @lookupinfo@[@l_lastseen@,expertsonline]
@l_user@ Displays the username of the person who executed the command.
@l_intpoints@ Pulls points without the thousands separator.
@l_joindate@ Displays the date the user joined the channel.
@l_streamrank@ Displays the user's stream rank.
@l_hrstolevelup@ Number of hours until the user reaches the next stream rank.
@l_pointstolevelup@ Number of points until the user reaches the next stream rank.
@l_userclass@ Displays the class of the user. In order of priority; [Streamer, DeepBot, VIP Gold, VIP Silver, VIP Bronze, Mod Level 2, Mod Level 1, Viewer]
@l_nextrank@ Shows the next stream rank.
@l_viprank@ Displays the VIP rank of the user.
@rand@[min|max] Generates a random number between the minimum and maximum numbers specified. E.g. @rand@[1|100]
@rand@[min|max|unique] “Unique” parameter to allow multiple random numbers to be generated in a single message
@readfile@[PathToFile\Example.txt] Reads a line from an existing text file. (By default, it uses the custom logs folder in your DeepBot folder). E.g. @readfile@[followcount.txt]
@readfile@[Line#,Example.txt] Reads a specific line from an existing text file. For example, @readfile@[4,users.txt] will read the fourth line. Use 'l' (L) instead of a number to read the last line.
@replace@[String/Variable|To Replace|To Replace With] Searches a string or variable and performs a find/replace operation on it. For example, @replace@[@target@|@|] will search the @target@ variable for any @ symbols. If it finds any, it will remove them from the text. Another example of this is @replace@[@target@|_| ], which would replace any _ (underscores) with a space. E.g. @replace@[This_is_a_bot_test.|_| ] → This is a bot test.
@savefile@[PathToFile\Example.txt,Example Line will be added] Creates a new text file or, if a text file with the same name already exists, it will overwrite the existing file. E.g. @savefile@[deathcounter.txt,The death counter is now at @counter@]
@savelog@[PathToFile\Example.txt,Example Line will be added] Adds new lines to existing files. E.g. @savelog@[userqueue.txt,@user@ purchased a spot at @time@] You can also write the same text as the text sent to the channel by using @message@. E.g. @user@ has purchased a song! E.g. @savelog@[songpurchase.txt,@time@:@target@])
@sendstreamermsg@[message] Allow the bot to send messages as the streamer.
@sound@[delay,file] Play a specified wav/mp3 file after a specified delay.
@steam@[SteamCommunityID] Displays Steam ID and the game that person is currently playing. E.g. @steam@[expertsonline] (This goes off your Steam ID, so just use the last part after id/. E.g. http://steamcommunity.com/id/expertsonline)
@subs@ Displays the total number of users subscribed to the channel. (This only works for partnered Twitch channels.)
@tts@[message] This will play the message through text-to-speech. e.g. @tts@[Hello, from expertsonline]
@unixtime@ Numeric time for use in if statements. (Number of seconds since January 1, 1970)
@userinfo1@[username] Display info from the user in the user database e.g. @userinfo1@[@user@]
@userinfo2@[username] Display info from the user in the user database e.g. @userinfo2@[@user@]
@userinfo3@[username] Display info from the user in the user database e.g. @userinfo3@[@user@]
@weather@[city, country code] Checks the weather in any part of the world. E.g. @weather@[Rome, 00197] or @weather@[@target@[1], @target@[2]]
/chat or /discord /chat for messages to post in chat or /discord for it to post into discord. Choose which channel a custom command goes to in discord with /discord channel=name
/w /w and the users name or @user@ will whisper the user that runs the command
\r\n Use \r\n if you would like to skip a like which will make the bot post anything after it as a new message

Custom API Examples


Custom API Examples (These are free to use, however they aren't guaranteed to be working 100%):

You can find more API Examples Here.


Custom Command Examples


Command Description Example(s)
!checkmeDisplays info of the user executing the command@user@ / VIP rank: @viprank@ / Stream rank: @streamrank@ / Next rank: @nextrank@ in @hrstolevelup@ hours / Hours watched: @hours@ / Joined stream: @joindate@ / Follow date: @followdate@
!currentfollowersGrab current number of total followersCurrent number of followers: @customapi@[http://customapi.deepbot.tv/totalfollows/expertsonline]
!deathcountAdd deaths to the counterDeath count: @counter@
!randomuserSelects a random user in the channelViewer: @randomuser@
!riggedUse @target@ or @user@Life ain't fair @user@, deal with it.
!slapUse @target@[1]@user@ slapped @target@[1] while @target@[2] watched.
!songrequestUse an alias for !requestsong!requestsong @target@
!startarenaUse an alias and @target@[1]!startarena @target@[1] @target@[2]
!steamGrabs Steam profile info@steam@[@target@]
!timeGrabs your local timeCurrent time: @time@ or @time24@
!titleGrabs the title of the stream and the game being played@title@ playing @game@
!uptimeDisplays the stream's uptimeCurrent uptime: @uptime@ or @uptime2@
!weatherDisplays the current weather for the location specified@weather@[@target@[1], @target@[2]]
custom_commands.txt · Last modified: 2018/08/28 03:32 by ianchandler1990