Menu

MoobotFactoids

Axanon

For sake of example, we'll use the name mybot as the bot's name, "!" as the command character (prefix), and , as command nesting brackets. These commands are preformed in the channel which you want the factoids in. It is also assumed that supybot.reply.whenAddressedBy.nick is true for some examples.

Channel/Global Factoids

If you want to share factoids across channels, you can do so by setting the supybot.databases.plugins.channelSpecific variable to false. See !config help supybot.databases.plugins.channelSpecific for help. Changing this option requires a restart of the bot!

Creating factoids

In the channel, type:

mybot: something is hello world

or

!something is hello world

typing !something in the channel, the bot will reply:

<mybot> something is hello world

Nesting also works with factoids:

!echo [something]

Factoids as a reply

In the channel, type:

mybot: something is <reply>hello world

or

!something is <reply>hello world

The bot will reply:

<mybot> hello world

Nesting also works with replied factoids:

!echo [something]

Factoids as an action

In the channel, type:

!something is <action>waves hello!

The bot will reply with the action.

*** Mybot waves hello!

Random answers

In the channel, type:

!fruit is <reply>(apple|banana|orange)

!fruit will reply with one of the listed fruits (randomly chosen):

<mybot> orange

This allows for some creative nesting:

!echo Can anybody spare a [fruit]?

Multiple definitions

Say there is more than one answer for a particular factoid. We can use is also to define multiple answers. This does not work with <action> and only the first answer can use <reply>. In the channel, type:

mybot: aloha is hello
mybot: aloha is also goodbye

!aloha produces:

&lt;mybot&gt; aloha is hello, or goodbye

if instead the first factoid was:

mybot: aloha is &lt;reply&gt;hello

then the bot would respond with:

&lt;mybot&gt; hello, or goodbye

Modifying factoids

For this to work, the factoid must already exist:

mybot: no something is goodbye world

or

!no something is goodbye world

no, (notice the comma) will also work.

output for !something is now:

&lt;mybot&gt; something is goodbye world