mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-23 11:13:51 -05:00
Bump discord.py to 1.7.0 (#4928)
* Bump discord.py, but to the git version for now * Import GuildConverter from d.py and deprecate our implementation * Import PartialMessageConverter in our commands extension * Use newly added `Cog.has_error_handler()` rather than private method * Update snowflake regex to use 20 as max length See Rapptz/discord.py#6501 * Use new supported way for custom cooldown buckets * Include group args in command signature * Update code to use `Client.close()` over `Client.logout()` * Add StageChannelConverter and StoreChannelConverter * Fix AttributeError in licenseinfo
This commit is contained in:
@@ -28,7 +28,6 @@ from typing import (
|
||||
import discord
|
||||
|
||||
from discord.ext.commands import check
|
||||
from .converter import GuildConverter
|
||||
from .errors import BotMissingPermissions
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -70,7 +69,7 @@ GlobalPermissionModel = Union[
|
||||
discord.TextChannel,
|
||||
discord.CategoryChannel,
|
||||
discord.Role,
|
||||
GuildConverter, # Unfortunately this will have to do for now
|
||||
discord.Guild,
|
||||
]
|
||||
GuildPermissionModel = Union[
|
||||
discord.Member,
|
||||
@@ -78,7 +77,7 @@ GuildPermissionModel = Union[
|
||||
discord.TextChannel,
|
||||
discord.CategoryChannel,
|
||||
discord.Role,
|
||||
GuildConverter,
|
||||
discord.Guild,
|
||||
]
|
||||
PermissionModel = Union[GlobalPermissionModel, GuildPermissionModel]
|
||||
CheckPredicate = Callable[["Context"], Union[Optional[bool], Awaitable[Optional[bool]]]]
|
||||
|
||||
Reference in New Issue
Block a user