Yet another IRC bot library
Project description
FatBotSlim
Yet another Python IRC bot library…
Features:
asynchronous
multi-server
easy to use plugin system
automated help messages generation for custom plugins
colored logging
colored IRC messages
command line parser to set your custom bot settings from the console
Dependencies:
gevent
chardet
Installation:
From GitHub:
git clone https://github.com/mattoufoutu/fatbotslim.git cd fatbotslim python setup.py install
From PyPI:
pip install fatbotslim
Documentation:
The documentation is hosted on readthedocs and is available in the following formats:
Example:
This very simple bot answers Hello <username>! when someone says !hello in a public message.
Using the fatbotslim.cli helpers also gives your bot an integrated command line arguments parser.
For more detailed informations about writing custom handlers and more complex bots, please refer to the documentation.
from fatbotslim.cli import make_bot, main
from fatbotslim.handlers import CommandHandler, EVT_PUBLIC
class HelloCommand(CommandHandler):
triggers = {
'hello': [EVT_PUBLIC],
}
def hello(self, msg):
self.irc.msg(msg.dst, "Hello {0}!".format(msg.src.name))
bot = make_bot()
bot.add_handler(HelloCommand)
main(bot)
Just try it!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file FatBotSlim-0.1.1.tar.gz
.
File metadata
- Download URL: FatBotSlim-0.1.1.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d9c2ca0ba21b7c9126be2cd868dfb8a9a26cb994de691c1190a0c85fa396c87 |
|
MD5 | 249ac614cabdb080d1704aa4e9ea9e8d |
|
BLAKE2b-256 | 16ecf58efeb78ad8a7a2d7a1e3a277d1c0f89942d43e30af44372536ade93d38 |