R E A D M E

BOHT is a pure python3 framework to program bots (a botlib), provides an IRC bot to use and is extendible by programming your own commands. BOHT uses a timestamped, type in filename, JSON stringified, files on filesystem backend and has timed based logging capabilities. BOHT has been placed in the Public Domain and contains no copyright or LICENSE.

I N S T A L L

you can fetch BOHT from the following:

https://pypi.org/project/boht | http://bitbucket.org/bthate/boht

if you need BOHT to have access to your local directory use this:

> export PYTHONPATH=”.”

this will add your current directory to the pythonpath so the packages in it can be found by BOHT.

installation is through pypi:

> sudo pip3 install boht

you can also run the bot from the tarball at pypi and run it directly or install with setup.py:

> python3 setup.py install –user

C O N F I G U R A T I O N

BOHT includes one program, the boht shell:

> boht [-m mod1,mod2] command

to connect to irc use the -m boht.irc option.

> boht -m boht.irc -s irc.freenode.net -c #boht -n boht -z

E D I T

use the ed command to edit BOHT objects:

> boht ed obj.base.Cfg shell=False

P R O G R A M M I N G

programming your own commands is easy, your can load modules with the -m option. if you create a mods directory and put your hello.py module in it, you would use:

> boht -m mods

any command you have coded in hello.py would be available, see the show cmds command.

> boht show cmds

a command is a function with one argument, the event that was generated on the boht.

example:

def mycmd(event):
<your code here>

you can use event.reply() to send response back to the user:

def hello(event):
event.reply(“hello %s” % event.nick)

after starting boht with -m mods, you see the hello command added to the boht:

> boht s cmds

ed,find,hello,ps,rm,show,stop,undel

C O D E

boht framework to program bots.
boht.base base classes.
boht.clock timers, repeaters.
boht.cmds basic commands.
boht.command list of tokens parsed into a command.
boht.entry simple data entry commands.
boht.fleet list of bots.
boht.kernel boot code and main handler.
boht.handler event handler.
boht.irc IRC bot module.
boht.loader module loader.
boht.run place to stash runtime objects.
boht.shell shell related commands.
boht.static semi static tables.
boht.tasks threads.
boht.trace traceback.
boht.users manage users.
boht.utils utility functions.

H A V E F U N

enjoy the coding ! ;]

bthate@dds.nl | botfather on #dunkbots at irc.freenode.net | xmpp: bart@xmpp.fi