Closed
Description
Summary
The @commands.bot_has_permissions
(and possibly other similar decorators such as has_permissions
) always result in CheckFailure
if evaluating moderate_members
.
Reproduction Steps
Use the example code below in a bot to see the issue happen.
Minimal Reproducible Code
@commands.command()
@commands.bot_has_permissions(moderate_members=True)
@commands.guild_only()
async def timeout_test(self, ctx):
await ctx.send("haha permissions work as intended!")
Expected Results
If the bot has either Administrator
or Moderate Members
, the message is sent.
Actual Results
The command will always result in CheckFailure
, regardless of the bot's permissions.
Intents
discord.Intents(guilds = True, members = True, bans = True, emojis = True, messages = True, invites = True, reactions = True)
System Information
- Python v3.10.1-final
- py-cord v2.0.0-alpha
- py-cord pkg_resources: v2.0.0a4580+g1d65214e
- aiohttp v3.7.4.post0
- system info: Linux 5.15.10-zen1-1-zen #1 ZEN SMP PREEMPT Fri, 17 Dec 2021 11:17:39 +0000
Checklist
- I have searched the open issues for duplicates.
- I have shown the entire traceback, if possible.
- I have removed my token from display, if visible.
Additional Context
The timeout functionality works correctly if the bot has the permission to time out members, it is only the check that fails.