This is a collection of placeholders to use within factoids for the bot Shocky on EsperNet IRC. They were collected by manually checking this list for used placeholders and testing them on EsperNet.
| Placeholder | Description |
|---|---|
%arg{idx}[-[to_idx]] |
examples: %arg0%, %arg1-3%, %arg4-% - prints out the provided argument with index idx. A range of arguments to be printed can also be given by appending a "-" to the index. If no to_idx is provided, all following arguments will be printed out. |
%bot% |
the name of the bot |
%chan% |
current channel |
%inp% |
the whole input of the command |
%rndn% |
random name of a user in the channel |
%user% |
command executor |
<lua> |
will treat the command as Lua code. "arg" is a table with all arguments passed to the command, and "factoid" is a table with all other factoids. You can execute other factoids by calling factoid["name_of_factoid"](). "sender" is a variable containing the name of the command executor. |
| Variable | Content |
|---|---|
arg |
A table with all arguments passed to the command |
factoid |
A table containing other available factoids.The table can be used like this:
|
channel |
The channel as userdata. |
channel.name |
The name of the current channel. |
channel.topic |
The topic of the current channel. |
channel.users |
A table the users connected to the channel. |
sender |
The name of the command executor. |
| Function | Result |
|---|---|
channel.isop( username ) |
True; if they have op. |
channel.isvoiced( username ) |
True; if they have voice. |
Lua specific crap.
factoid["nameOfFactoid"]()orfactoid.nameOfFactoid())