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.
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!
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]
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]
In the channel, type:
!something is <action>waves hello!
The bot will reply with the action.
*** Mybot waves hello!
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]?
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:
<mybot> aloha is hello, or goodbye
if instead the first factoid was:
mybot: aloha is <reply>hello
then the bot would respond with:
<mybot> hello, or goodbye
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:
<mybot> something is goodbye world