Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Framework to program bots

Project description

BOTLIB is a python3 framework you can use to program bots. It makes it possible to program your own module enabling your own commands and contains serveral modules that can be used to program bots.

BOTLIB has a MIT no-clause license.

install

you might need to do the following if the bot doesn’t work:

export PYTHONPATH="."
export PYTHONIOENCODING="utf-8"

clone the source:

bart@okdan:~$ hg clone https://bitbucket.org/bthate/botlib
bart@okdan:~$ cd botlib
bart@okdan:~/botlib$ sudo python3 setup.py install

another option is to download with pip3 and install globally:

bart@okdan:~$ pip3 install botlib --upgrade

irc

use the bot-irc program to connect to an IRC server.

bart@okdan:~$ bot-irc -n jsonbot -s irc.freenode.net -c \#dunkbots --shell

xmpp

use the botje-xmpp to connect to an XMPP server

bart@okdan:~$ bot-xmpp -u monitor@localhost --room test@conference.localhost --shell

users

you need to add a users origin to be able to give the bot commands, add a user with the meet command:

bart@okdan:~$ bot meet user@server
user user@server created

to give the user a permission you can use the perm command:

bart@okdan:~$ bot perm user@server ps
ok user@server

the default shell user is root@shell and gives access to all the commands that are available.

programming

user programmed modules are read from the ~/.mods directory, you can put your .py files over there.

example:

def hi(event):
    event.reply("hi %s" % event.origin)

Project details


Release history Release notifications

History Node

49

History Node

48

History Node

47

History Node

46

History Node

45

History Node

44

History Node

43

This version
History Node

42

History Node

41

History Node

40

History Node

39

History Node

38

History Node

37

History Node

36

History Node

35

History Node

34

History Node

33

History Node

32

History Node

31

History Node

30

History Node

29

History Node

28

History Node

27

History Node

26

History Node

25

History Node

24

History Node

22

History Node

21

History Node

20

History Node

19

History Node

18

History Node

17

History Node

16

History Node

15

History Node

14

History Node

13

History Node

12

History Node

11

History Node

10

History Node

9

History Node

8

History Node

7

History Node

6

History Node

5

History Node

4

History Node

3

History Node

2

History Node

1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
botlib-42.tar.gz (41.6 kB) Copy SHA256 hash SHA256 Source None Jan 13, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page