Tombot is a general textual bot with interfaces to IRC and Discord. It has its own small composable interpreted language.
:say Hey, ++ space ++ nick ++ say !
:(random 10 == say 5 >< say It's five!) <> say It's not five.
Interfaces to various APIs.
:wiki Haskell programming language
:anime Jojo's Bizarre Adventure
User-definable functions.
:let utctime :formattime <- unixtime ++ space ++ >0 %c
Timed events and reactive events.
:every 3600 :airing
:sleep 100 >> say Hello!
:on /^what time is it/i :utctime
Is is undergoing development and will be unstable. Current focus:
- Protocol-neutral central interface between IRC/Discord and the bot.
- Wiping out space leaks
- Natural language generation:
markov,predict - Going from config as a Haskell module to pretty-printed JSON.
- Fixing dead functions:
translate,romaji
You can install Tombot with stack.
stack install
This section is outdated
A line using her functions need to be prefixed with : by default.
-
help -
!Search DuckDuckGo using a !bang tag.
! <bang> <string>:!i Haskell -
>Displays a message to the channel, or user if it is a private message.
> <string>:> I-it's not like I'm sending this because I want to or a-anything, idiot! -
<Displays a message to the user.
< <string>:< Psst, Tombot! Please print some secret messages. -
^Searches for a message in the bot's chatlog.
^ [<index>] [<string>]:^ 3 banana -apple -
bBan a user, or several.op
b <nick> ...:b Moss John -
kKick a user, or several.op
k <nick> ...:k Frank Tom -
mModify the channel mode.op
m [+|-]<mode> <args>:m -b Moss!*@* -
vVoice a user, or several.op
v <nick> ...:v Chen Rin -
anSearch for anime releases and optionally choose how many results to print.
an [<number>] [<string>]:an 10 potato -
aiDisplays currently airing anime.
ai [<string>]:ai -
inShow whether a regex matches a string.
in <regex> <string>:in /banana/ <- ra banana|cake -
maSearch for manga releases and optionally choose how many results to print.
ma [<number>] [<string>]:ma 5 banana no nana -
mePerform an action (/me) with the bot.
me <string> -
onRun some function(s) on match.
on <regex> <kawaiilang>:on /what should i do/i :nick ++ ra Go to bed|Do your work|Work out -
raDisplays a random number or string.
ra <integer>, <string> | <string> ...:ra Suwako|Momiji|Youmu -
reAdd a reminder for someone; printed on join.
re <nick> [<string> | <kawaiilang>]re ChinaGal :> Won't you take me where you go? -
usUserlist printing function. -
lenLength of a string.
len <string>:us -> len -
letDefine a new function by composing old ones.
let <string> <kawaiilang>:let randomuser :us -> sed s/ /|/ -> ra -
rawControl the bot directly; raw IRC message.admin
raw <string>:raw PRIVMSG #example :Hi! -
sedA regex replace function.
sed s/<match>/<replacement>/[i] <string>:> I love bananas! -> sed s/banana/apple/ -
botsConfirms that it is a bot. -
evalEvaluate Kawaii Language code.
eval <kawaiilang>:eval :> Hi! -
helpDisplay help about a function.help <string>:help functions -
hostDisplay the hostname of the user. -
http -
isupDisplays the status of a website.
isup <url>:isup haskell.org -
joinJoin a channel.
join <string>:join #example -
killKill a bot event.kill <string>kill event -
nameDisplay the user's name. -
nickDisplay the user's nick. -
partLeave the current channel. -
quitMake the bot quit the IRC server.admin -
showDisplay data held by the bot.
show [Config | Chan <string> | User <string>]show User John -
statDisplay or change a user's stat.admin*
stat <nick> [<stat>]:stat Offender Banned -
tellTell a user something the next time they talk.
tell <nick> <string>:tell James Check your left pocket! -
verb -
wikiDisplays the top paragraph of a Wikipedia article.
wiki <string>:wiki haskell programming language -
cjoinDisplay or change the ChanJoin value of the current channel.op
cjoin [True | False] -
eventAdd a new bot event.admin
event <string> <kawaiilang>:event airing :sleep 1800 >> ai -
funcsDisplay or change the channel's function list.op
funcs [Whitelist [<string> ...] | Blacklist [<string> ...]]funcs Blacklist -
kanjiDisplay the definitions of a kanji.
kanji <string>:kanji 氷 -
nicksDisplay or change the bot's list of nick it uses on connect.op
nicks <string> ...:nicks Tomboy Otenba -
sleepDelay by n seconds. Useful when composing with other functions.
sleep <number>:sleep 30 >> us -> sed s/ /|/ -> ra -> b -
titleDisplay the title of a website.
title <url>:title https://example.love/ -
topicDisplay, append to, strip from, or set the channel's topic.op
topic [+<string | -<string> | <string]:topic + | We're finally moving to Freenode! -
cajoinDisplay or change the channel's ChanAutoJoin value.op
cajoin [True | False] -
prefixDisplay or change the bot's KawaiiLang prefix characters.op
prefix [<char> ...]prefix .:! -
romajiConvert Japanese syllabaries to Romaji.
romaji <string>:romaji あなたを食べたい -
connect -
restartRestart the bot's process.root -
reversePrint the words in reverse order.
* Only when given an argument.
-
->Pipe, it appends the output of the function on the left into the function on the right.
.> Hi! -> ra Bye!|- Pipe into next command, before it runs. -
<-The opposite of->.
:ra Oslo is the worst.|The best: <- ra Tokyo|Oslo|Madrid- Pipe into previous command, before it runs. -
++Add, it appends the string of the output on the right to the output on the left.
.ai ++ .an- -
>>Execute the first function, disregard the output and continue.
:tell Fogun Did you watch Gargantia yet? >> tell lunar Hi!- Disregardtell's output because it outputs nothing. -
<>Or; return whatever function's result isn't empty.Lazy
:ra You're safe for now| <> b John- Only ban John whenrareturns an empty value. -
><And; return the right function's output only if both functions return something.Lazy
:ra You're dead, kid!| >< b John- Only ban John whenrareturnsYou're dead kid! -
+>And append; return both functions' outputs appended only if both return something.Lazy
:> Title: +> title http://github.com/- only output and append when the bot successfully fetches Github's website title.
Some functions have files associated with them. These files are stored in the
config directory as defined in Config.hs. These files are:
-
helpThis is the help file, and it is included with the bot, you just need to move it to the directory. -
tellThis is the file that is filled with tells from thetellfunction, which are messages printed when a user shows activity. -
respondThis is the file that is filled with ons from theonfunction, which are regex matches and the Kawaiilang to run on match. -
letfuncs