Skip to content

Instantly share code, notes, and snippets.

View adamsbytes's full-sized avatar

Adam adamsbytes

View GitHub Profile
@adamsbytes
adamsbytes / python-discord-events.md
Created December 28, 2021 22:44
Retrieving and creating Discord events with Python

Interacting with the Discord Events API using Python

As of writing this, documentation for the Discord events API is a little lacking and the feature is not yet integrated into Discord.py.

The Basics

This gist presents a basic class that performs a couple event actions against the Discord API.

To interact with the Discord API you need an async http client, for this gist it'll be aiohttp. You'll need a Discord bot created, and to have a token generated for that bot. Your bot will also need event permissions in the guilds/servers you are trying to create events in.