What is this?
This is NAFF, a python API wrapper for Discord.
NAFF is intended to be fast, easy to use, and easily modified to suit your needs.
Features:
- ✅ 100% coverage of the application commands API
- ✅ Dynamic cache with TTL support
- ✅ Modern and Pythonic API
- ✅ Proper rate-limit handling
- ✅ Feature parity with most other Discord API wrappers
Is this just another Discord.py fork?
While this library shares features and some stylistic choices with discord.py, it is completely separate from them. We think discord.py is a fantastic library, but we disagree with the direction and design decisions that were made by it.
How do I use this?
Here is a basic example:
from naff import Client, Button, ButtonStyles, CommandTypes, context_menu, prefixed_command, listen
bot = Client(sync_interactions=True)
@listen()
async def on_startup():
print("Ready")
print(f"This bot is owned by {bot.owner}")
@prefixed_command()
async def test_button(ctx):
await ctx.send("Blurple button example!", components=Button(ButtonStyles.BLURPLE, "Click me"))
@context_menu(name="User menu", context_type=CommandTypes.USER, scopes=[931832853770149918])
async def user_context(ctx):
await ctx.send("Context menu example!", ephemeral=True)
bot.start("TOKEN")
For more examples check out our examples repo or the docs. You also can explore projects with the NAFF topic or older dis-snek topic.
If you get stuck join our Discord server.
"Can I contribute to this project?"
Of course, we welcome all contributions to this library. Just ensure you follow our requirements. If youre stuck for things to contribute, check out our GitHub Projects for inspiration.
Links:
- Support Server: https://discord.gg/hpfNhH8BsY
- Documentation: https://naff-docs.readthedocs.io/en/latest/
Metadata
Release files for naff 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| naff-2.1.0.tar.gz | 643.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| naff-2.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.3 MB
Release files / naff-2.1.0.tar.gz
| Download URL | naff-2.1.0.tar.gz |
|---|---|
| Size | 643.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a58db2f56f6f5fc4fbefb354ce4d17a78080817ac8524ce6e74dedc54e1c850c
|
|
BLAKE2b-256 checksum How to use checksums |
f795137b23ed816ea55f2478b7d0e00b31f65179fca96e67bd9c768cda21663d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Release files / naff-2.1.0-py3-none-any.whl
| Download URL | naff-2.1.0-py3-none-any.whl |
|---|---|
| Size | 701.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e433683b62f1a151867a44c752cb8725e8505f99086b07765f66696fa553adf2
|
|
BLAKE2b-256 checksum How to use checksums |
b4aa51498bd9813d6e79d44b1519c64712fd0a5b67bc2899e6abf8fa40391845
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|