disagreement/docs/extension_loader.md
Slipstream 84b4e49c6a
Add extension reload helper (#9)
* Add reload_extension helper

* Removes unused message reaction event handling

Eliminates dead code for message reaction events that were not being processed or utilized by the application.

Cleans up the event dispatcher by removing the unused parser method and event mappings for reaction add/remove events.
2025-06-10 15:37:33 -06:00

16 lines
539 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Extension Loader
The `disagreement.ext.loader` module provides simple helpers to manage optional
extensions. Extensions are regular Python modules that expose a `setup` function
called when the extension is loaded.
```python
from disagreement.ext import loader
```
- `loader.load_extension(name)` Import and initialize an extension.
- `loader.unload_extension(name)` Tear down and remove a previously loaded
extension.
- `loader.reload_extension(name)` Convenience wrapper that unloads then loads
the extension again.