irc-bots
A collection of Sopel IRC bots for self-hosted servers.
| Bot | Purpose | Doc |
|---|---|---|
| alfred | Server management, bot control, file hosting, soju bouncer | docs/alfred.md |
| osterman | Channel moderation, auto-modes, idle tracking | docs/osterman.md |
| daffy | Duck hunting game | docs/daffy.md |
| contessa | Recipe suggestions | docs/contessa.md |
| shireen | News headlines and weather | docs/shireen.md |
| daft | YouTube playlist manager | docs/daft.md |
| herald | Owner-follow bot and keyword responder | docs/herald.md |
| salvador | Image-to-mIRC-art renderer | docs/salvador.md |
Requirements
- Python 3.9+
- Sopel 8.x
pip install sopel
Bot-specific dependencies:
| Bot | Extra |
|---|---|
| alfred | pip install requests |
| salvador | pip install Pillow |
All others use only the standard library.
Install
-
Clone or copy this repo.
-
Copy the example config for the bot you want and fill in your details:
cp alfred/alfred.cfg ~/.config/sopel/alfred.cfg $EDITOR ~/.config/sopel/alfred.cfgSetnick,host,port,owner, and any[section]paths. Theextrakey must point to the bot's directory (e.g./path/to/irc-bots/alfred). -
Create any required data directories:
mkdir -p /var/log/<botname> # contessa: place recipes.json at the path set in [contessa] recipes_path # shireen: data.json is created automatically on first run # osterman: db.json and track.db are created automatically on first run # daffy: scores.db is created automatically on first run -
Start the bot:
sopel --config ~/.config/sopel/<botname>.cfg -
(Optional) Register as a service. Example OpenRC init script:
sh #!/sbin/openrc-run supervisor=supervise-daemon command="/usr/bin/sopel" command_args="--config /home/user/.config/sopel/<botname>.cfg" command_user="user" output_log="/var/log/<botname>/daemon.log" error_log="/var/log/<botname>/daemon.log" depend() { need net; }
Notes
- All bots use
!as the command prefix by default (setprefixin config). - All bots share
!join,!part,!chans, and!helpas owner-only admin commands. When multiple bots are in the same channel and the owner types one of these, all bots act - that's intentional. - osterman uses short-form aliases (
!b,!k,!v, etc.) that are unique to it. No other bot in this collection uses conflicting short forms.
License
MIT - see LICENSE.
