No description
| .gitignore | ||
| bot.py | ||
| CLAUDE.md | ||
| config.example.env | ||
| memory.md | ||
| README.md | ||
quotebot
A simple quotes IRC bot for Libera.Chat. Standard-library
Python only — no pip install, no virtualenv. Connects over TLS, joins a channel,
and serves quotes from a local SQLite database via ! commands.
Run it
python3 bot.py
That connects to irc.libera.chat:6697 as treesquotes and joins #r.trees.
To override anything, copy the example config and source it first:
cp config.example.env config.env # config.env is gitignored
# edit config.env as needed
set -a; source config.env; set +a
python3 bot.py
Commands (in-channel)
| Command | Does |
|---|---|
!quote |
Random quote |
!quote <id> |
Quote by number |
!addquote <text> |
Store a new quote, returns its id |
!delquote <id> |
Delete a quote |
!search <term> |
First quote containing a substring |
!quotecount |
How many quotes are stored |
!help |
List commands |
Notes
- Quotes live in
quotes.db(SQLite, created on first run, gitignored). - The bot auto-reconnects with exponential backoff and answers
PING. - If the nick is taken it appends
_and retries. - A NickServ password, if set via
IRC_NICKSERV_PASS, is sent on connect — keep it in the environment, never in the repo. - Outbound messages are spaced by
QUOTEBOT_SEND_DELAYseconds to avoid tripping Libera's flood limits.
Registering the nick (recommended)
Libera lets unregistered bots connect, but channels can be set to block
unregistered users. To register treesquotes:
- Connect once, then
/msg NickServ REGISTER <password> <email>. - Confirm via the emailed code.
- Put the password in
config.envasIRC_NICKSERV_PASSand restart.