Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 1.55 KB

README.md

File metadata and controls

49 lines (30 loc) · 1.55 KB

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://wyvern.readthedocs.io

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

Installation

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

Example

import asyncio
import os

import wyvern

bot = wyvern.GatewayBot(os.environ["TOKEN"], intents=wyvern.Intents.UNPRIVILEGED)


@bot.listener(wyvern.StartingEvent)
async def starting(event: wyvern.StartingEvent) -> None:
    bot.logger.info("Starting bot...")


# or using the implemented decorators


@bot.on_started()
async def started(event: wyvern.StartedEvent) -> None:
    bot.logger.info(f"Logged in as {event.user.tag}")


async def main():
    async with bot:
        await bot.start()


asyncio.run(main())