-
Notifications
You must be signed in to change notification settings - Fork 60
Commands
All commands are prefixed with a /
. So if you want to execute the command foo
, you must write:
!!/foo
Where the !!
is the Invocation Pattern (see main, subject to change by bot handler. In this wiki, !!
is assumed). The general form being:
!!/commandName [arg0 [arg1 [...]]]
Some commands require special privilege to use (as in, you must be a room owner or a moderator). Having said that, there are...
In those privileged commands, there's a small subset that while normally requiring special privilege, will be triggered once enough (usually 2) users invoke them within a span of time. At the time of writing, these are
ban
die
-
summon
andunsummon
The reason being the community should have the power to prevent spam in case something goes wrong with the bot, or a user is abusing it.
This wiki assumes (for demonstration purposes) that your username is Dave, your user-id is 5318008 and the message you sent has an id of 42.
- help
- listen
- eval
- coffee
- refresh
- forget
- info
- listcommands
- tell
- afk
- ban
- unban
- convert
- define
- doge
- hang
- jquery
- learn
- live
- die
- mdn
- meme
- mustache
- moustache
- nudge
- spec
- stat
- stats
- summon
- unsummon
- undo
- unonebox
- urban
- user
- weather
- welcome
- wiki
- xkcd
- youtube
- zalgo
!!help [cmdName]
Fetches documentation for given command, or general help article.
When called with no arguments, returns a link to the main wiki page. When called with an argument cmdName
, it displays a help message for the specific commands.
!!help
@Dave https://github.com/Zirak/SO-ChatBot/wiki/Interacting-with-the-bot
!!help spec
@Dave spec: Find a section in the ES5 spec
!!help unexisto
@Dave Command unexisto does not exist.
!!listen stuff
Forwards the message to my ears. Explicitly try and invoke a listener. Useful for /tell
.
!!give me a lick
@Dave Mmmm! you taste just like raisin
!!tell Bob listen give me a lick
@Bob Mmmm! you taste just like raisin
!!eval code
Forwards message to javascript code-eval, equivalent to the >
prefix.
!!eval 4+6
:42 10
!!> 4+6
:42 10
!!coffee code
Forwards message to coffeescript code-eval, equivalent to the c>
prefix.
!!coffee not yes
:42 false
!!c> not yes
:42 false
!!refresh
(Owner only) Reloads the browser window I live in.
!!forget cmdName
Forgets a given command. You may have to have permission to forget certain commands (only commands you taught via /learn
; owners can delete any /learn
ed command).
!!info [cmdName]
Grabs some stats on my current instance or a command.
When called without an argument, returns stats on the current bot instance (uptime and so forth). With an argument, returns meta-data on a command (when it was learned, by whom, etc).
!!listcommands
Lists commands. Whoop de doo.
!!tell msg_id|usr_name cmdName [cmdArgs]
Redirect command result to user/message.
!!tell Bob listcommands
@Bob [...listcommands stuff....]
!!tell 253961 listcommands
:253961 [...listcommands stuff...]
/afk message
Set an afk message. After a few minutes of away time, if a user pings you, the bot will reply with the message.
Dave: !!afk hurricane
[...some time passes...]
Alice: @Dave Did you survive?
Bot: @Alice Dave is afk: hurricane.
!!ban [usr_id|usr_name]
(Communal command) Bans a user from using me. Lacking arguments, prints the ban list.
Assuming a user called Yarbal (uid=400), and another user with an id of 890 not present in the room:
!!ban 890
@Dave User 890 added to mindjail.
!!ban Yarbal
@Dave User Yarbal added to mindjail.
!!ban
@Dave 890 (?), 400 (Yarbal)
!!ban unexisto
@Dave Cannot find user unexisto.
!!unban usr_id|usr_name
(Owner only) Frees a user from my mindjail.
!!convert <num><unit> [to|in <unit>]
Converts a unit of measurement to its counterparts (e.g. degrees to radians.) Units are case-sensitive (e.g. F is Farrenheit, f is feet, and c does not map to C (Celsius)). Can also convert most currencies using a rate-exchange API.
!!convert list
Displays a list of known units. Just the units. No explanations. If you don't know what the units mean, you probably don't need them, or you can experiment and see.
!!convert 100C
@Dave 212F, 373.15K
!!convert 1240g to st
@Dave 0.1952st
Money conversions are a bit trickier. This command tries to be lenient, accepting most currency ISO codes in both lowercase and uppercase and mapping some currency symbols (like € to EUR and ₹ to INR), but it'll break if you try to be a smartass (like /convert 10 bucks). Also note that there must be a target currency: One cannot simply convert one currency into all the rest.
!!convert 100USD to EUR
@Dave 76.5579EUR
!!convert 100USD to ₨
@Dave 5413.0128INR
!!define something
Fetches definition for a given word.
!!doge one,two,three[,nth]
so shibe, much doge, wow.
!!google stuff
Returns the first 3 results of googling query. Note that the query is passed verbatim, so you can go wild on query modifiers (like site:, inurl:, quoting, etc.)
!!hang [guess]
Starts a Hangman game if none is running, or send a guess to the one currently running.
!!jquery stuff [moreStuff]
Fetches jquery documentation link to stuff
.
!!learn commandName outputPattern [inputRegex [description]
!!learn greet "Hello, $0!" \w+
!!learn greet 'Hello, $0!' \w+ 'summons the lord'
An alphanumeric, dash - and underscore _ string, self explanatory
A string passed to /parse
(see above for doc), with the matched groups ($0, $1, ...
for the capture-groups in inputRegex
) as the extra variables.
By default, invoking a taught command will reply to the user who invoked it. However, you can prepend your command with a modifier to change how it'll be outputted:
Pattern | Replies to... |
---|---|
<user> |
user (default) |
<msg> |
message |
<> |
nothing (just the output |
Lacking anything, it defaults to <user>
. Examples:
!!/learn messageReply "<msg> this is a message reply"
!!/messageReply
:42 this is a message reply
!!/learn direct "<> this is a direct message"
!!/direct
this is a direct message
A regular expression, which will be matched against the command arguments.
Defaults to .*
Optional. Additional info displayed when the command is /help
ed.
!!live
(Owner only) Resurrects me (:D) if I'm down (D:)
!!die
(Communal command) Kills me :(
!!mdn something
Fetches the mdn article on something
.
!!meme memeName
Return a meme link.
!!meme [list]
List known memes.
!!meme fuu
:42 http://cdn.alltheragefaces.com/img/faces/png/rage-classic.png
!!meme list
@Dave deskflip, fuu, iseewhatyoudidthere, no, notbad, ohyou, okay, troll, trollface, youdontsay
!!mustache [link|usrid|username] [mustache=rand(0,5)]
!!moustache [link|usrid|username] [mustache=rand(0,5)]
Mustachifies a user via http://mustachify.me/.
!!nudge intervalInMinutes [message]
Tell the bot to send you message
after intervalInMinutes
minutes. Replies with a nudge id, so that it may be removed with:
!!nudge remove id
Also available as a listener:
nudge|remind|poke me? in? intervalInMinutes message
!!spec something
Searches the informal ES5 spec for something
.
!!stat usrid|usrname
!!stats usrid|usrname
Gives useless stats, like rep and badges, about a user. Omit first argument to get your own.
!!summon roomid
(Community command) Say boopidi bee and in the room I shall be.
!!unsummon [roomid=your_roomid]
(Community command) Chant zippidi lepat and from the room I shall depart.
!!undo
Undo (delete) last message.
!!undo [msgid0, msgid1, ...]
Deletes specified message ids.
!!undo xN
!!undo ~N
for last xN
messages or the ~Nth
to last message.
!!unonebox [on|off]x
Get/toggle the unonebox listener. The bot automatically edits a message which results in a onebox (wikipedia, youtube, images, etc) to supress the onebox.
!!urban something [n=0]
Fetches the n
th UrbanDictionary definition of something
.
!!user [userid|username]
Posts your user link or specified user's'.
!!weather (lan, lon)
!!weather city
Gets current weather. In the first form (the parentheses are important!) by latitude and longitude, in the second form, searches for such a city. Uses the wonderful OpenWeatherMap API.
!!weather (50.95751, 131.81250)
@Dave [Novobureyskiy](http://openweathermap.org/city/2018964): 3.75C (276.9K), light rain
!!weather London, UK
@Dave [London](http://openweathermap.org/city/2643743): 13.58C (286.73K), few clouds
!!welcome user
Welcomes a user.
!!wiki something
Search Wikipedia for something
.
!!xkcd [id]
Returns the xkcd with id id
or a random one.
!!xkcd new
Returns the latest xkcd.
!!youtube stuff
Search YouTube for stuff
.
!!zalgo HORROR
H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ http://stackoverflow.com/a/1732454/1216976