You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: rewrite README, add plugin guide and architecture overview
Fix major README inaccuracies: commands/ -> plugins/, remove
nonexistent plugin_loader.py, correct plugin API examples to use
PLUGIN_ID and Permission enum, fix nemp command table.
Add docs/plugins.md covering both old-style and new-style plugin
patterns, event system, help registration, and task pool API.
Add docs/architecture.md covering connection lifecycle, message
dispatch, handler system, event system, and concurrency model.
Trim AGENTS.md from 209 to 164 lines, fix ConnectionDown inheritance.
Set the Discord webhook URL and the IRC channel/nick to listen on.
46
55
47
56
## Running
48
57
49
58
```bash
50
59
uv run irc_bot.py
51
60
```
52
61
53
-
Logs are written to `BotLogs/` and the last crash traceback is saved to `exception.txt`.
62
+
The bot automatically reconnects on disconnection with exponential backoff (5s to 300s). Logs are written to `BotLogs/` and the last crash traceback is saved to `exception.txt`.
54
63
55
64
## Usage
56
65
57
66
All commands use the configured prefix (default `=`). Examples:
58
67
59
68
| Command | Permission | Description |
60
69
|---------|-----------|-------------|
61
-
|`=help`| everyone | List available commands |
62
-
|`=help <cmd>`| everyone | Show help for a command |
63
-
|`=nemp running true`| op | Start polling for mod updates |
64
-
|`=nemp list`| everyone | List tracked mods |
65
-
|`=nemp status <mod>`| everyone | Check a specific mod's status |
66
-
|`=reload <cmd>`| admin | Reload a command module |
Plugins are Python files in `plugins/` that are loaded automatically at startup. There are two styles; the **new-style** (class-based) is preferred for new plugins.
94
118
95
-
Commands are Python files in `commands/` that are loaded automatically. Minimal example:
119
+
### New-style (class-based)
96
120
97
121
```python
98
-
ID="greet"
99
-
permission =0
100
-
privmsgEnabled =True
122
+
from command_router import Permission, command, subcommand
123
+
124
+
PLUGIN_ID="greet"
125
+
126
+
classPlugin:
127
+
asyncdefsetup(self, router, startup):
128
+
"""Called on load (startup=True) or reload (startup=False)."""
0 commit comments