- automod commands
- channel commands
- name
- topic
- thread name
- overwrites
- invite
- typing event
- user commands
- nickname
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import annotations | |
| import datetime | |
| from typing import Any, Literal, Self, overload | |
| import discord | |
| type ValidMediaType = ( | |
| str | |
| | Media | |
| | discord.MediaGalleryItem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import annotations | |
| from typing import ( | |
| Generic, | |
| Optional, | |
| TypeVar, | |
| Any, | |
| TYPE_CHECKING, | |
| ) | |
| import discord |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import annotations | |
| from typing import ( | |
| Dict, | |
| Generic, | |
| List, | |
| Optional, | |
| TypeVar, | |
| Any, | |
| TYPE_CHECKING, | |
| Tuple, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # for testing: | |
| # import collections | |
| # emoji = collections.namedtuple("emo", ["animated"])(False) | |
| emoji = ... # some (Partial)Emoji object | |
| guild = ... # some Guild object | |
| emojis = guild.emojis | |
| total = len(guild.emojis) | |
| limit = guild.emoji_limit | |
| animated = sum(1 for e in emojis if e.animated) |
The hyperlinks are either links to a gist or discord message in the discord.py server
- [2021-04-04]
- Danny starts development of discord.py 2.0
- [2021-08-28]
- Danny stops dpy development
- [2022-03-06]
- Danny starts dpy development again, after announcement of v10
- [2022-03-14]
- Danny reworks async stuff, breaking changes for all!
"complete" as in it supports app and text commands and has some comments explaining the code. As you may have noticed, there are multiple files in this gist:
Text Cmmands Only Here
See here the complete check with support for app and text commands:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import Any, Self, overload | |
| import asyncio | |
| import discord | |
| HasChildren = ( | |
| discord.ui.Container | |
| | discord.ui.ActionRow |
See here an overcomplicated way to wait for input from a user using a modal. Every step is explained using comments.
This is meant to replace Client.wait_for("message") for application commands.
- Easy way to construct a Modal with one text input field.
- Easily pass a check from the constructor
NewerOlder