mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 09:22:31 -05:00
discord.py 2.0 update (3d914e08->2.0.1) (#5709)
This commit is contained in:
@@ -10,7 +10,8 @@ if TYPE_CHECKING:
|
||||
|
||||
|
||||
async def mass_purge(
|
||||
messages: List[discord.Message], channel: Union[discord.TextChannel, discord.Thread]
|
||||
messages: List[discord.Message],
|
||||
channel: Union[discord.TextChannel, discord.VoiceChannel, discord.Thread],
|
||||
):
|
||||
"""Bulk delete messages from a channel.
|
||||
|
||||
@@ -26,7 +27,7 @@ async def mass_purge(
|
||||
----------
|
||||
messages : `list` of `discord.Message`
|
||||
The messages to bulk delete.
|
||||
channel : `discord.TextChannel` or `discord.Thread`
|
||||
channel : `discord.TextChannel`, `discord.VoiceChannel`, or `discord.Thread`
|
||||
The channel to delete messages from.
|
||||
|
||||
Raises
|
||||
@@ -247,7 +248,7 @@ async def check_permissions(ctx: "Context", perms: Dict[str, bool]) -> bool:
|
||||
return True
|
||||
elif not perms:
|
||||
return False
|
||||
resolved = ctx.channel.permissions_for(ctx.author)
|
||||
resolved = ctx.permissions
|
||||
|
||||
return resolved.administrator or all(
|
||||
getattr(resolved, name, None) == value for name, value in perms.items()
|
||||
|
||||
Reference in New Issue
Block a user