Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
custom_commands [2018/02/27 20:40] ianchandler1990custom_commands [2022/11/06 17:22] (current) – Added ; to donate start of list in @savedb@ variable dante557
Line 1: Line 1:
 +{{keywords>chatbot commands,custom commands,twitch chatbot,chatbot,chatbot custom commands}}
 ===== Custom Command Variables ===== ===== Custom Command Variables =====
 +On this page you will find all the variables that are currently available for you to use in your custom commands. \\
 +Please see the table below for the full list of variables available to you.\\
  
-This is a list of all available custom command variables.+You can organise this list by either searching for the keyword/variable or by clicking on one of the column names.\\ 
 +Any variables that are exclusively for Deepbot VIP subscribers will also be listed in the table below.\\ 
 +Feel more customisation is needed? Request them over at our [[https://www.twitter.com/DeepbotSupport|Twitter]] or [[https://discord.deepbot.tv/|Discord]].
  
-Looking for community-made commands/mini-games?+<datatable order='[[2,"asc"],[0,"asc"]]'> 
 +^ Variable ^ Description ^ Vip Exclusive? ^  
 +| @btag@  | Returns the value held in the "Battle Tag" field when going to edit a viewer in the user database. Viewers can set this by running **!btag name#xxxx**. The x's represent a number in the Blizzard Battle tag.| No | 
 +| @cmdstatus@[!command] | Checks if a custom command you have created is either enabled or disabled.| Yes | 
 +| @cost@ | Tells the user how much it cost to execute the custom command. | No | 
 +| @counter@ | Counts the number of times a command has been executed successfully. The value that this pulls from the command can be reset in the custom command editor. | No | 
 +| @customapi@[InsertAPIURLHere] | Use your own custom API. Include the brackets when making the command. (See the examples below.) | No | 
 +| @disablecmd@[!command] | Disables a command. | Yes | 
 +| @discordinfo@[username] | Assuming the viewer in question has linked their Discord account this variable retrieves the user's Discord name or ID. e.g. \\ @discordinfo@[expertsonline] or @discordinfo@[@user@,id] | Yes | 
 +| @enablecmd@[!command] | Enables a command. | Yes | 
 +| @escrow@ | Gets the number of points the user has currently placed in bets, raffles, and mini-games. | No | 
 +| @followers@ | Total number of users following the channel. | No | 
 +| @game@ | Displays what is currently being streamed in the channel. | No | 
 +| @getcounter@[!command] | Grabs the counter of a command. (E.g. for a death counter mods could use a mod only custom command !adddeath to add the death to the counter. Viewers could use !death which contains "@getcounter@[!adddeath]" to display what the counter for the !adddeath command is currently at. | No | 
 +| @hours@ | Total number of hours the user has been watching the stream. | No | 
 +| @hrstolevelup@ | Number of hours until the user reaches the next stream rank. | No | 
 +| @intpoints@ | Pulls points without the thousands separator. | No | 
 +| @joindate@ | The date the user first joined the channel. | No | 
 +| @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@]. | Yes | 
 +| @nextrank@ | Shows the next stream rank. | No | 
 +| @points@ | Displays the user's points. | No | 
 +| @pointsname@ | Name of the channel currency. | No | 
 +| @pointstolevelup@ | Number of points until the user reaches the next stream rank. | No | 
 +| @randomuser@ | Picks a random user currently in the channel. | No | 
 +| @remotesound@[delay,url] | Plays MP3 files hosted on websites. Delay is in seconds.| Yes | 
 +| @slabspoints@[check%%|%%@user@] | Command to get the points on the Stream Labs platform. | Yes | 
 +| @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. | Yes | 
 +| @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. | Yes | 
 +| @setcounter@[!command%%|%%number] | Sets the counter of a command. Useful if you need to manually edit the counter at a moment's notice | No | 
 +| @streamrank@ | Displays the user's stream rank. | No | 
 +| @target@ | Returns everything that has been entered after the command | No | 
 +| @target@[x] | Returns what has been entered at a specific location after the command. x is the position (starting at 1) of the word you would like to return.  | No | 
 +| @target@[x%%|%%y] | Returns what has been entered after the command between a specific range. x is the starting position and y is the ending position. The first position is always 1 | No | 
 +| @time@ | Displays the current time on the computer the bot is hosted using the 12-hour clock. | No | 
 +| @time24@ | Displays the current time on the computer the bot is hosted using the 24-hour clock. | No | 
 +| @title@ | Displays the current stream title. | No | 
 +| @uptime@ | Shows the total amount of time the stream has been live (calculated by Twitch). | No | 
 +| @uptime2@ | Similar to @uptime@, except the total time is self-computed by DeepBot, with grace period for crashes/disconnects. | No | 
 +| @user@ | Displays the username of the person who executed the command. | No | 
 +| @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] | No | 
 +| @viewers@ | Current number of viewers watching the stream. | No | 
 +| @viprank@ | Displays the VIP rank of the user. | No | 
 +| @calc@[operator%%|%%x%%|%%y] | Returns a number depending on the operator used and the numbers (x and y) provided. Operators that can be used are; + (Addition: x + y), - (Subtraction: x - y), *(Multiplication: x * y), / (Division: x / y), % (Percentage: x% of y), mod (Modulus: remainder of x / y) | Yes | 
 +| @ctrt@ | Generates a link to retweet a tweet. E.g. Support the stream by retweeting! @ctrt@[658476806278881281] | Yes | 
 +| @ctt@[InsertCustomTweet] | This generates a link to tweet out a custom message specified. E.g. Support the stream by tweeting! <nowiki>@ctt@[Check out expertsonline @ http://twitch.tv/expertsonline playing @game@]</nowiki> | Yes | 
 +| @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) | Yes | 
 +| @customjsonapi2@ | Custom API support with GET/POST capability as well as custom headers. \\ Example GET \\ @customjsonapi2@[{  "url": "https://postman-echo.com/get",  "method": "GET",  "headers": \[ "Content-Type: application/json" \],  "path": "data.args.foo1",  "showResult": "true"}] \\ Example POST \\ @customjsonapi2@[{  "url": "https://postman-echo.com/post",  "method": "POST",  "payload": { "args": { "foo1": "bar1","foo2": "bar2"}},  "headers": \[ "Content-Type: application/json" \],  "path": "data.args.foo1",  "showResult": "false"}]| Yes | 
 +| @datetime@[format] | Formatted date/time output. Formatting Details : https://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx | Yes | 
 +| @datetime@[secs] | Convert seconds to human friendly text | Yes | 
 +| @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] | Yes | 
 +| @exec@ | Chains one or more commands from a single command. E.g. @exec@[5,!bot] will run !bot after 5 seconds. Can also add if_discord if_chat or if_whisper to the the command as well. So @exec@[5,if_discord,!botdisord] @exec@[5,if_chat,!botchat] this can then run a different command if its trigger buy someone in twitch chat or discord.| Yes | 
 +| @followdate@ | Displays the date the user followed the channel. | Yes | 
 +| @if@[data%%|%%%%|%%matchWith%%|%%%%|%%matchedResult%%|%%%%|%%FailResult] | An if-then statement that compares data and gives a response if it matches or not. | Yes | 
 +| @if@[data%%|%%%%|%%matchWith%%|%%%%|%%matchedResult] | Data is returned if match fails. | Yes | 
 +| @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!] | Yes | 
 +| @isnumber@[number] | Checks if the input is a number. | Yes | 
 +| @isnumber@[+%%|%%number] | Checks if the input is a positive number. Use - to check for negative numbers. | Yes | 
 +| @isonline@[user] | For checking if the user is currently in chat. | Yes | 
 +| @last5follows@ | Displays the last 5 users who followed the stream. (Also works for timed messages) | Yes | 
 +| @last10follows@ | Displays the last 10 users who followed the stream. (Also works for timed messages) | Yes | 
 +| @lastseen@ | Shows when a user was last seen talking in the channel. | Yes | 
 +| @lookupinfo@[var,user] | Displays info of a user. (Requires variable names to start with l_) e.g. @lookupinfo@[@l_points@,expertsonline]. Please see [[http://wiki.deepbot.tv/custom_commands?do=edit#lookupinfo_variables_vip_exclusive|LookupInfo Variables]] for more information.  | Yes | 
 +| @rand@[min%%|%%max] | Generates a random number between the minimum and maximum numbers specified. E.g. @rand@[1%%|%%100] | Yes | 
 +| @rand@[min%%|%%max%%|%%unique] | "Unique" parameter to allow multiple random numbers to be generated in a single message | Yes | 
 +| @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] | Yes | 
 +| @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. | Yes | 
 +| @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. | Yes | 
 +| @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@] | Yes | 
 +| @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@]) | Yes | 
 +| @sendstreamermsg@[message] | Allow the bot to send messages as the streamer. | Yes | 
 +| @sound@[delay,file] | Play a specified wav/mp3 file after a specified delay. | Yes | 
 +| @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) | Yes | 
 +| @subs@ | Displays the total number of users subscribed to the channel. (This only works for partnered Twitch channels.) | Yes | 
 +| @tts@[message] | This will play the message through text-to-speech. e.g. @tts@[Hello, from expertsonline] | Yes | 
 +| @unixtime@ | Numeric time for use in if statements. (Number of seconds since January 1, 1970) | Yes | 
 +| @userinfo1@[username] | Display info from the user in the user database e.g. @userinfo1@[@user@] | Yes | 
 +| @userinfo2@[username] | Display info from the user in the user database e.g. @userinfo2@[@user@] | Yes | 
 +| @userinfo3@[username] | Display info from the user in the user database e.g. @userinfo3@[@user@] | Yes | 
 +| @setuserinfo1@[username%%|%%new info] | sets info1 for the user in the user database | Yes | 
 +| @setuserinfo2@[username%%|%%new info] | sets info2 for the user in the user database | Yes | 
 +| @setuserinfo3@[username%%|%%new info] | sets info3 for the user in the user database | Yes | 
 +| @weather@[city, country code] | Checks the weather in any part of the world. E.g. @weather@[Rome, 00197] or @weather@[@target@[1], @target@[2]] | Yes | 
 +| @editvip@[user%%|%%vip_rank%%|%%+days] | Add vip to a selected user. Ei. @editvip@[@target@%%|%%3%%|%%+30] | Yes | 
 +| @obs@[StartStreaming]| Use this to make deepbot start your live stream in Obs with Obs remote | Yes | 
 +| @obs@[StopStreaming] | Use this to make deepbot stop your live stream in Obs with Obs remote | Yes | 
 +| @obs@[EnableFilter%%|%%%%|%%Name of Source/Scene%%|%%%%|%%Name of Filter]| Enable a filter that you have on your specified scene or source | Yes | 
 +| @obs@[DisableFilter%%|%%%%|%%Name of Source/Scene%%|%%%%|%%Name of Filter]| Disable a filter that you have on your specified scene or source | Yes | 
 +| @raffleinfo@ | Shows information about the users raffle entry status | Yes | 
 +| @readdb@[Key To Read] | Reads the provided key from the key/value database. e.g. @readdb@[slots.@user@]. If the value does not exist in the database, or has expired, this variable will return with a blank value. | Yes | 
 +| @savedb@[TTL Value%%|%%Key To Change%%|%%Value To Save] | Save the provided value to the key/value database. e.g. @savedb@[60%%|%%slots.@user@%%|%%50]. The "Time To Live" (TTL) value is the number of seconds you want the provided value to be valid for. After this time has been suppassed, it will "expire" the value. You can append the TTL value with the following letters to treat it with add a different unit of time; m (minute), h (hour), d (day). | Yes | 
 +| @cleardb@[Key to remove] | Clear the Key/Value database of any values that contain the provided key. You can also a single key by specifying the key (i.e. to clear a key called "slots.expertsonline" - @cleardb@[slots.expertsonline]) or multiple keys that share the same pattern (i.e. to clear all keys that start with "slots" - @cleardb@[slots.]) | Yes | 
 +| @token@[index%%|%%separator%%|%%search string] | Like @target@ except returns the position based on the separating character (%%|%% cannot be used for the separating character in any instance). Example: @token@[3%%|%%,%%|%%one,two,three] would return three. | Yes | 
 +| @stream@ | Return the streamer username that is currently connected to Deepbot (Not the Bot Name) | No | 
 +| @streamid@ | Return the user ID of the streamer account currently connected to Deepbot (Not the Bot Name) | No | 
 +| @queuepos[Queue Position%%|%%Queue Number] | Returns the viewer's username that is currently in the queue position stated. If no viewer is currently in that position, this will return blank | No | 
 +| @queuepos[Username%%|%%Queue Number] | Returns the provided viewer's position in the specified queue. | No | 
 +| @queuewait@[Queue Position%%|%%Queue Number] | Returns the current wait time of the viewer that is current at the stated queue position. | No | 
 +| @queuewait@[Username%%|%%Queue Number]  | Returns the provided viewer's current wait time in the specified queue. | No | 
 +| @toppoints@[X] | Returns a list of the viewers that hold the most amount of points/currency in your channel. X can be a number between 1 and 14. | No | 
 +| @topranks@[X] | Returns a list of the viewers that hold the highest ranks in your channel. X can be a number between 1 and 14. | No | 
 +</datatable>
  
-  * **[[user_custom_commands|User Made Commands]]** +==== Message Flags (VIP Exclusive) ====
-  * **[[custom_mini-games|Custom Command Mini-Games]]**+
  
-**__Table of Contents__**+There are a couple of message flags you can add to the beginning of your commands which will force a command output to be sent to another location. I.e. command is executed in Twitch chat but the output needs to go to a Discord channel. These can be found below.
  
-  * **[[custom_commands#Regular Variables|Regular Variables]]** +^ Message Flag  ^ Info ^ 
-  * **[[custom_commands#VIP Exclusive|VIP Exclusive Variables]]** +|/chat          |This will force the message to post to Twitch chat no matter where the command source is from (Discord/Whisper/Chat)
-  * **[[custom_commands#Custom API Examples|Custom API Examples]]** +|/discord       |This will force the message to post to the discord channels you have set in the "Broadcast Channels" text box you have set in Master Settings no matter where the command source is from (Discord/Whisper/Chat)| 
-  * **[[custom_commands#Custom Command Examples|Custom Command Examples]]**+|/w USERNAME    |This will whisper the specified user regardless of the command source (Discord/Whisper/Chat). Typically in commands this is used with /w @user@. This requires whisper integration to be turned on in Master Settings.| 
 +|/discord channel=CHANNELNAME |This will force the message to post to the discord server linked in Master Settings to the channel name specified no matter where the command source is from (Discord/Whisper/Chat)| 
 +|\r\n         |This is used in the middle of a message to post everything after that on a new line in Twitch chat. Effectively the same as typing a message, pressing return and then typing another message| 
 +|\!             |Overrides Deepbots default behaviour regarding triggering internal commands. This will cause deepbot to post the full message to Twitch chat. Useful for Deepbot to communicate with other bots that also use ! as a trigger |
  
 +====@LookupInfo@ Variables (VIP Exclusive)====
  
 +@LookupInfo@ is an example of a custom variable that can return multiple pieces of information about a viewer. In order to facilitate this, the use of additional variables are required.\\
 +These can be found in the below table.\\
 +For example, to return the battletag the user that triggered the command has set up you would put **@lookupinfo@[@l_btag@,@user@]** into the custom message box.
  
-----+<datatable paging="false" searching="false"> 
 +^ Variable ^ Description ^ Lookupinfo Example ^ 
 +| @l_btag@ | Show the battle tag for the user. | @lookupinfo@[@l_btag@,@user@] | 
 +| @l_followdate@ | Displays the date the user followed the channel. | @lookupinfo@[@l_followdate,@user@] | 
 +| @l_hours@ | Total number of hours the user has been watching the stream. | @lookupinfo@[@l_hours,@user@] | 
 +| @l_lastseen@ | Shows when the user was last seen talking in the channel. | @lookupinfo@[@l_lastseen@,@user@] | 
 +| @l_user@ | Displays the username of the person who executed the command. | @lookupinfo@[@l_user@,@user@] | 
 +| @l_intpoints@ | Pulls points without the thousands separator. | @lookupinfo@[@l_intpoints@,@user@] | 
 +| @l_joindate@ | Displays the date the user joined the channel. | @lookupinfo@[@l_joindate@,@user@] | 
 +| @l_streamrank@ | Displays the user's stream rank. | @lookupinfo@[@l_streamrank@,@user@] | 
 +| @l_hrstolevelup@ | Number of hours until the user reaches the next stream rank. | @lookupinfo@[@l_hrstolevelup@,@user@] | 
 +| @l_pointstolevelup@ | Number of points until the user reaches the next stream rank. | @lookupinfo@[@l_pointstolevelup@,@user@] | 
 +| @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] | @lookupinfo@[@l_userclass@,@user@] | 
 +| @l_nextrank@ | Shows the next stream rank. | @lookupinfo@[@l_nextrank@,@user@] | 
 +| @l_viprank@ | Displays the VIP rank of the user. | @lookupinfo@[@l_viprank@,@user@] | 
 +</datatable>
  
-=== Regular Command Variables === +==== Custom API Examples ====
- +
----- +
- +
-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 [[http://deepbot.deep.sg/forums/index.php?board=7.0|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] | Creates sub-directories (or folders) in the custom logs folder.  +
-| @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. <nowiki>(E.g. Message : http://twitch.tv/@target@, "!twitch experts" will display http://twitch.tv/experts)</nowiki>+
-| @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! <nowiki>@ctt@[Check out expertsonline @ http://twitch.tv/expertsonline playing @game@]</nowiki>+
-| @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%): Custom API Examples (These are free to use, however they aren't guaranteed to be working 100%):
Line 140: Line 154:
 You can find more API Examples **[[custom_api|Here]]**. You can find more API Examples **[[custom_api|Here]]**.
  
----- +==== Custom Command Examples ====
- +
-=== Custom Command Examples === +
- +
-----+
  
 ^  Command  ^  Description  ^  Example(s)  ^ ^  Command  ^  Description  ^  Example(s)  ^
Line 160: Line 170:
 |!uptime|Displays the stream's uptime|Current uptime: @uptime@ or @uptime2@| |!uptime|Displays the stream's uptime|Current uptime: @uptime@ or @uptime2@|
 |!weather|Displays the current weather for the location specified|@weather@[@target@[1], @target@[2]]| |!weather|Displays the current weather for the location specified|@weather@[@target@[1], @target@[2]]|
 +|!so| A shoutout command that says the game last played|<code>
 +/me Go Follow @target@ at www.twitch.tv/@target@ right now!! They were last playing @customjsonapi2@[{  "url": "https://api.twitch.tv/helix/channels?broadcaster_id=@customjsonapi2@[{  "url": "https://api.twitch.tv/helix/users?login=@replace@[@target@[1]|@|]",  "method": "GET", "path": "data.0.id",  "showResult": "true"}]",  "method": "GET", "path": "data.0.game_name",  "showResult": "true"}]
 +</code>|