https://github.com/raclettes/multiplehooks
Small library that allows multiple pre + post invoke hooks on discord.py
https://github.com/raclettes/multiplehooks
Last synced: 4 months ago
JSON representation
Small library that allows multiple pre + post invoke hooks on discord.py
- Host: GitHub
- URL: https://github.com/raclettes/multiplehooks
- Owner: raclettes
- License: gpl-3.0
- Created: 2021-04-01T10:27:30.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-01T10:27:33.000Z (about 4 years ago)
- Last Synced: 2024-11-17T10:45:51.112Z (6 months ago)
- Language: Python
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# multiplehooks
Small library that monkey patches multiple pre + post invoke hooks on discord.py. Open-sourced version of what's used in [Kolumbao](https://kolumbao.com/).This overrides the given bot's `_before_invoke`, `before_invoke`, `_after_invoke`, `after_invoke` attributes, so be careful if you override these yourself.
## Installation
To install the package to your Python installation, clone the repository locally then run the following command in the repository's directory.
```bash
py setup.py install
```You can now use the library!
## Usage
```python
from discord.ext import commands
from multiplehooks import before, after# Initialize the bot
bot = commands.Bot("prefix")# Setup
before(bot)
after(bot)# Done!
```## Issues
If you encounter any problems, check out [current issues](https://github.com/starsflower/multiplehooks/issues) or [make a new issue](https://github.com/starsflower/multiplehooks/issues/new).