A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.
Key Features
- Modern Pythonic API using
async
andawait
. - Proper rate limit handling.
- Optimised in both speed and memory.
Installing
Python 3.8 or higher is required
To install the library without full voice support, you can just run the following command:
# Linux/macOS
python3 -m pip install -U sen-pai
# Windows
py -3 -m pip install -U sen-pai
Otherwise to get voice support you should run the following command:
# Linux/macOS
python3 -m pip install -U "sen-pai[voice]"
# Windows
py -3 -m pip install -U sen-pai[voice]
To install the development version, do the following:
$ git clone https://github.com/senpai-development/senpai
$ cd senpai
$ python3 -m pip install -U .[voice]
Optional Packages
- PyNaCl (for voice support)
Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g. apt
, dnf
, etc) before running the above commands:
- libffi-dev (or
libffi-devel
on some systems) - python-dev (e.g.
python3.6-dev
for Python 3.6)
Quick Example
import senpai
from senpai import anime
bunny = anime.Bunny(command_prefix='>')
@bunny.event
async def on_ready():
print('UwU online!')
@bunny.command()
async def ping(ctx):
await ctx.send('pong uwu')
bunny.run('token')
You can find more examples in the examples directory.
Utility Support ----———————————- For other utilities such as music commands are available at BunnyUtils
This includes paginator and invite manager, more updates to BunnyUtils is coming soon!