feat(moderation): added command to configure the use_discord_permissions value

This commit is contained in:
Seaswimmer 2023-12-15 14:07:21 -05:00
parent 16bd2f70de
commit bfad13a40c
Signed by untrusted user: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -1526,6 +1526,13 @@ class Moderation(commands.Cog):
await self.config.guild(ctx.guild).dm_users.set(not await self.config.guild(ctx.guild).dm_users()) await self.config.guild(ctx.guild).dm_users.set(not await self.config.guild(ctx.guild).dm_users())
await ctx.send(f"DM users setting set to {await self.config.guild(ctx.guild).dm_users()}") await ctx.send(f"DM users setting set to {await self.config.guild(ctx.guild).dm_users()}")
@moderationset.command(name="permissions")
@checks.admin()
async def moderationset_permissions(self, ctx: commands.Context):
"""Toggle whether the bot will check for discord permissions."""
await self.config.guild(ctx.guild).use_discord_permissions.set(not await self.config.guild(ctx.guild).use_discord_permissions())
await ctx.send(f"DM users setting set to {await self.config.guild(ctx.guild).use_discord_permissions()}")
@moderationset.command(name="logchannel") @moderationset.command(name="logchannel")
@checks.admin() @checks.admin()
async def moderationset_logchannel(self, ctx: commands.Context, channel: discord.TextChannel = None): async def moderationset_logchannel(self, ctx: commands.Context, channel: discord.TextChannel = None):