Skip to main content

An API wrapper for Discord filled with snakes

Project description

PyPI Downloads Code style: black black-formatted CodeQL Discord Documentation Status

What is this?

This is Dis-Snek, a python API wrapper for Discord. Snek 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.

Compared to discord.py; Dis-Senk starts faster, responds faster, is simpler to use, and comes equipped with plenty of creature comforts to help get your bot launched faster.

How do I use this?

Here is a basic example:

bot = Snake(sync_interactions=True)

@listen()
async def on_startup():
    print("Ready")
    print(f"This bot is owned by {bot.owner}")
    
@message_command()
    async def blurple_button(self, ctx):
        await ctx.send("hello there", components=Button(ButtonStyles.BLURPLE, "A blurple button"))
        
@context_menu(name="user menu", context_type=CommandTypes.USER, scopes=701347683591389185)
    async def user_context(self, ctx):
        await ctx.send("Context menu:: user")


bot.start("Token")

For more examples check out our examples repo or the docs, and 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 Trello for inspiration.

Links:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dis-snek-4.3.0.tar.gz (143.8 kB view hashes)

Uploaded Source

Built Distribution

dis_snek-4.3.0-py3-none-any.whl (183.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page