A powerful asynchronous IRC bot library. https://nickolas360.com/pyrcb2/
irc
irc-bot
python
async
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nickolas360 d75c4318dc Bump dev version 8 months ago
docs Bump dev version 8 months ago
examples Fix links pointing to old docs 1 year ago
licenses Include a database of grapheme break properties 1 year ago
misc Update grapheme break DB 1 year ago
pyrcb2 Bump dev version 8 months ago
scripts Handle possible BOM in GraphemeBreakProperty.txt 1 year ago
tests Fix join() timeouts with extended-join 1 year ago
.gitignore Initial commit 2 years ago
LICENSE Include a database of grapheme break properties 1 year ago
MANIFEST.in Initial commit 2 years ago
README.rst Bump dev version 8 months ago
setup.py Bump dev version 8 months ago

README.rst

pyrcb2

pyrcb2 is an asyncio-based library for writing IRC bots. It is designed to be easy to use, customizable, and high-level.

pyrcb2 includes features such as account tracking, user prefix tracking (voice, op, etc.), messaging delaying to prevent throttling, and long message splitting.

pyrcb2 also makes use of asyncio and coroutines in Python. This allows you to write asynchronous code in a linear fashion—you can handle responses to commands right after you send them.

# Wait until the bot has joined #channel.
await bot.join("#channel")
print("There are", len(bot.users["#channel"]), "users in #channel.")

# Get user1's account.
result = await bot.get_account("user1")
if result.success:
    account = result.value or "(no account)"
    print("user1 is logged in as", account)

Installation

Install with pip:

$ pip3 install pyrcb2

Or clone and install with setup.py:

$ ./setup.py install

Alternatively, you can clone and install with pip:

$ pip3 install .

You will need to run the commands above as root if you're installing globally. You can use the --user option to install to your home directory instead.

Documentation

Documentation for pyrcb2 is available at https://nickolas360.com/pyrcb2/. If you're new to pyrcb2, start with this guide and take a look at the examples.

This branch contains the development version of pyrcb2. See the stable branch for the latest stable release.

Tests

To run pyrcb2's tests, run python3 -m tests. If you have coverage installed, you can run coverage run -m tests.__main__ to get information on test coverage.

License

pyrcb2 is licensed under the GNU Lesser General Public License, version 3 or later. Some parts are released under other licenses; see the full license notice and individual files for details.