Not another freaking fork
Project description
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 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/naff
- Documentation: https://naff-docs.readthedocs.io/en/latest/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file naff-1.7.0.tar.gz
.
File metadata
- Download URL: naff-1.7.0.tar.gz
- Upload date:
- Size: 617.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca225c4b8d11b0fd5a7ddca58a8aee048275e8d53ca6de2df98d7897392cb30c |
|
MD5 | a18bb2a54bfa222c8d6514fab8ae437c |
|
BLAKE2b-256 | c466e6fc593ce758b1f91860358d56f684964bfe0dc65b3b659e21665ac4ee1e |
File details
Details for the file naff-1.7.0-py3-none-any.whl
.
File metadata
- Download URL: naff-1.7.0-py3-none-any.whl
- Upload date:
- Size: 671.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 518186f1c4cfbe5f34515d551ed40832761a172f0c33f57d3ab9b161da3fa5fc |
|
MD5 | 5977693672b3835fe7fa751851b6415c |
|
BLAKE2b-256 | e32ab0b0af757418dda331b6a3ae5a7319a753e51420e034391c5b9c99255ad7 |