discord.py 2.0 update (3d914e08->2.0.1) (#5709)

This commit is contained in:
Jakub Kuczys
2022-10-03 16:07:15 +02:00
committed by GitHub
parent d7d6ab46f4
commit f02528378f
44 changed files with 454 additions and 317 deletions

View File

@@ -221,8 +221,8 @@ class Permissions(commands.Cog):
"Global rules (set by the owner) are checked first, then rules set for servers. If "
"multiple global or server rules apply to the case, the order they are checked in is:\n"
" 1. Rules about a user.\n"
" 2. Rules about the voice channel a user is in.\n"
" 3. Rules about the text channel or a parent of the thread a command was issued in.\n"
" 2. Rules about the voice channel a user is connected to.\n"
" 3. Rules about the channel or a parent of the thread a command was issued in.\n"
" 4. Rules about a role the user has (The highest role they have with a rule will be "
"used).\n"
" 5. Rules about the server a user is in (Global rules only).\n\n"
@@ -330,7 +330,7 @@ class Permissions(commands.Cog):
except discord.Forbidden:
await ctx.send(_("I'm not allowed to DM you."))
else:
if not isinstance(ctx.channel, discord.DMChannel):
if ctx.guild is not None:
await ctx.send(_("I've just sent the file to you via DM."))
finally:
file.close()