Add !grabquote [user] to quote a user's last line
This commit is contained in:
parent
52e579e364
commit
0a4edfe245
3 changed files with 40 additions and 3 deletions
|
|
@ -28,6 +28,7 @@ python3 bot.py
|
|||
| `!quote` | Random quote |
|
||||
| `!quote <id>` | Quote by number |
|
||||
| `!addquote <text>` | Store a new quote, returns its id |
|
||||
| `!grabquote [user]`| Grab the last line a user said (`!grab` alias); no user = last speaker |
|
||||
| `!delquote <id>` | Delete a quote |
|
||||
| `!search <term>` | First quote containing a substring |
|
||||
| `!quotecount` | How many quotes are stored |
|
||||
|
|
@ -36,6 +37,9 @@ python3 bot.py
|
|||
## Notes
|
||||
|
||||
- Quotes live in `quotes.db` (SQLite, created on first run, gitignored).
|
||||
- `!grabquote` reads an in-memory buffer of each user's last channel line;
|
||||
that buffer is per-session and resets on reconnect. Grabbed lines are stored
|
||||
as `<nick> message`. Bot commands are never recorded, so you can't grab one.
|
||||
- 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 —
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue