[](https://pypi.org/project/naff/)
[](https://pepy.tech/project/dis-snek)
[](https://github.com/psf/black)
[](https://github.com/NAFTeam/NAFF/actions/workflows/precommit.yml)
[](https://github.com/NAFTeam/NAFF/actions/workflows/codeql-analysis.yml)
[](https://discord.gg/hpfNhH8BsY)
[](https://naff-docs.readthedocs.io/en/latest/?version=latest)
# 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:
```python
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](https://github.com/NAFTeam/examples) or the [docs](https://naff.info). You also can [explore projects with the `NAFF` topic](https://github.com/topics/naff) or older [`dis-snek` topic](https://github.com/topics/dis-snek).
If you get stuck join our [Discord server](https://discord.gg/hpfNhH8BsY).
## "Can I contribute to this project?"
Of course, we welcome all contributions to this library. Just ensure you follow our [requirements](/CONTRIBUTING.md).
If youre stuck for things to contribute, check out our [GitHub Projects](https://github.com/orgs/NAFTeam/projects/1) for inspiration.
## Links:
- Support Server: https://discord.gg/hpfNhH8BsY
- Documentation: https://naff-docs.readthedocs.io/en/latest/
Raw data
{
"_id": null,
"home_page": "https://github.com/Discord-Snake-Pit/NAFF",
"name": "naff",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "",
"author": "LordOfPolls",
"author_email": "naff@lordofpolls.com",
"download_url": "https://files.pythonhosted.org/packages/f7/95/137b23ed816ea55f2478b7d0e00b31f65179fca96e67bd9c768cda21663d/naff-2.1.0.tar.gz",
"platform": null,
"description": "[](https://pypi.org/project/naff/)\n[](https://pepy.tech/project/dis-snek)\n[](https://github.com/psf/black)\n[](https://github.com/NAFTeam/NAFF/actions/workflows/precommit.yml)\n[](https://github.com/NAFTeam/NAFF/actions/workflows/codeql-analysis.yml)\n[](https://discord.gg/hpfNhH8BsY)\n[](https://naff-docs.readthedocs.io/en/latest/?version=latest)\n\n# What is this?\nThis is `NAFF`, a python API wrapper for Discord.\nNAFF is intended to be fast, easy to use, and easily modified to suit your needs.\n\n### Features:\n- \u2705 100% coverage of the application commands API\n- \u2705 Dynamic cache with TTL support\n- \u2705 Modern and Pythonic API\n- \u2705 Proper rate-limit handling\n- \u2705 Feature parity with most other Discord API wrappers\n\n## Is this just another `Discord.py` fork?\nWhile 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.\n\n## How do I use this?\nHere is a basic example:\n\n```python\nfrom naff import Client, Button, ButtonStyles, CommandTypes, context_menu, prefixed_command, listen\n\nbot = Client(sync_interactions=True)\n\n\n@listen()\nasync def on_startup():\n print(\"Ready\")\n print(f\"This bot is owned by {bot.owner}\")\n\n\n@prefixed_command()\nasync def test_button(ctx):\n await ctx.send(\"Blurple button example!\", components=Button(ButtonStyles.BLURPLE, \"Click me\"))\n\n\n@context_menu(name=\"User menu\", context_type=CommandTypes.USER, scopes=[931832853770149918])\nasync def user_context(ctx):\n await ctx.send(\"Context menu example!\", ephemeral=True)\n\n\nbot.start(\"TOKEN\")\n```\nFor more examples check out [our examples repo](https://github.com/NAFTeam/examples) or the [docs](https://naff.info). You also can [explore projects with the `NAFF` topic](https://github.com/topics/naff) or older [`dis-snek` topic](https://github.com/topics/dis-snek).\n\nIf you get stuck join our [Discord server](https://discord.gg/hpfNhH8BsY).\n\n\n## \"Can I contribute to this project?\"\nOf course, we welcome all contributions to this library. Just ensure you follow our [requirements](/CONTRIBUTING.md).\nIf youre stuck for things to contribute, check out our [GitHub Projects](https://github.com/orgs/NAFTeam/projects/1) for inspiration.\n\n## Links:\n- Support Server: https://discord.gg/hpfNhH8BsY\n- Documentation: https://naff-docs.readthedocs.io/en/latest/\n",
"bugtrack_url": null,
"license": "",
"summary": "Not another freaking fork",
"version": "2.1.0",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b4aa51498bd9813d6e79d44b1519c64712fd0a5b67bc2899e6abf8fa40391845",
"md5": "3ceb984260f1094ffeb083e8baad2a64",
"sha256": "e433683b62f1a151867a44c752cb8725e8505f99086b07765f66696fa553adf2"
},
"downloads": -1,
"filename": "naff-2.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3ceb984260f1094ffeb083e8baad2a64",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 700967,
"upload_time": "2023-01-06T16:51:21",
"upload_time_iso_8601": "2023-01-06T16:51:21.143917Z",
"url": "https://files.pythonhosted.org/packages/b4/aa/51498bd9813d6e79d44b1519c64712fd0a5b67bc2899e6abf8fa40391845/naff-2.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f795137b23ed816ea55f2478b7d0e00b31f65179fca96e67bd9c768cda21663d",
"md5": "a3439c8559b6f0c95e002f1b96c5838f",
"sha256": "a58db2f56f6f5fc4fbefb354ce4d17a78080817ac8524ce6e74dedc54e1c850c"
},
"downloads": -1,
"filename": "naff-2.1.0.tar.gz",
"has_sig": false,
"md5_digest": "a3439c8559b6f0c95e002f1b96c5838f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 643441,
"upload_time": "2023-01-06T16:51:23",
"upload_time_iso_8601": "2023-01-06T16:51:23.034980Z",
"url": "https://files.pythonhosted.org/packages/f7/95/137b23ed816ea55f2478b7d0e00b31f65179fca96e67bd9c768cda21663d/naff-2.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-06 16:51:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "Discord-Snake-Pit",
"github_project": "NAFF",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "naff"
}