Skip to main content

Custom events derived from events dispatched by Discord.

Project description

dependencies license

Custom events derived from events dispatched by Discord.

⚠️ Work In Progress!

Installation

This extension is currently not in PyPI.

$ python3 -m pip install -U git+https://github.com/vincentrps/nextcord-ext-events

Usage

An example for when subscribing to the on_member_kick event.

import nextcord
from nextcord.ext import commands, events
from nextcord.ext.events import member_kick


class MyBot(commands.Bot, events.EventsMixin):

    async def on_ready(self):
        print('Logged in!')

    async def on_member_kick(self, member: nextcord.Member, entry: nextcord.AuditLogEntry):
        print(f'{member} was kicked from {member.guild}!')


bot = MyBot(command_prefix='!', intents=nextcord.Intents.all())

bot.run("TOKEN")

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

nextcord-ext-events-0.1.0a0.tar.gz (7.9 kB view hashes)

Uploaded Source

Built Distribution

nextcord_ext_events-0.1.0a0-py3-none-any.whl (9.0 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