Skip to main content

wyvern





A [WIP] flexible and easy to use Discord API wrapper for python 🚀.

Warning: This library is very unstable and things might not work as expected. Feel free to create an issue.

Important Links

Support server: https://discord.gg/FyEE54u9GF

Documentation: https://sarthhh.github.io/wyvern/

PYPI: https://pypi.org/project/wyvern

Installation

$python -m pip install git+https://github.com/sarthhh/wyvern

Example Code:

  • CommandsClient with commands support.
import wyvern

# creating a CommandsClient object to interaction with commands.
client = wyvern.CommandsClient("TOKEN")

# creating a slash command using with_slash_command decorator.
@client.with_slash_command(name="hello", description="says a hello")
async def hello(interaction: wyvern.ApplicationCommandInteraction) -> None:
    # creating a response to the interaction.
    await interaction.create_message_response("hi!")


# running the bot.
client.run()
  • Basic GatewayClient with listener.
import wyvern

# creating a GatewayClient instance and storing it into the client variable.
# this acts as the interface between your bot and the code.

client = wyvern.GatewayClient("TOKEN", intents=wyvern.Intents.UNPRIVILEGED | wyvern.Intents.MESSAGE_CONTENT)

# creating an EventListener object and adding it to the client's event handler using the
# @client.with_listener decorator. You can set the maximum amount of time this listener will get triggered using
# the `max_trigger kwarg in the listener decorator.`


@client.as_listener(wyvern.Event.MESSAGE_CREATE)
async def message_create(message: wyvern.Message) -> None:
    """This coroutine is triggerd whenever the MESSAGE_CREATE event gets dispatched."""
    if message.content and message.content.lower() == "!ping":
        await message.respond("pong!")


# runs the bot.

client.run()

Download files

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

Source Distribution

wyvern-0.1.1.tar.gz (48.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wyvern-0.1.1-py3-none-any.whl (99.0 kB view details)

Uploaded Python 3

File details

Details for the file wyvern-0.1.1.tar.gz.

File metadata

  • Download URL: wyvern-0.1.1.tar.gz
  • Upload date:
  • Size: 48.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.8 Linux/6.0.8-arch1-1

File hashes

Hashes for wyvern-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7ee110e6dabf1d77722fd359e50e97adffa15410364050e998968cc5d0c29046
MD5 f1706e7c20e95da6759f9c4be9c31d24
BLAKE2b-256 d14d1f5b2e1209ddc5fc9cad15426f9f29f1887610132c55ea7aadafa333444e

See more details on using hashes here.

File details

Details for the file wyvern-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: wyvern-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 99.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.8 Linux/6.0.8-arch1-1

File hashes

Hashes for wyvern-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 557db5ea0f3f6dd07e823bf20cf0a0fbff96ca98147d23319f146d675475d101
MD5 9bf6d597f924a977dcfa27cb6d80d22c
BLAKE2b-256 632fe9a1c96efa56d58ff7348b497192b0856f9dc9298d988a2c19458d7ac35d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page