mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-07 09:52:30 -05:00
Allow enforcing reason to be filled in Mod cog commands (#6477)
Co-authored-by: Jakub Kuczys <me@jacken.men>
This commit is contained in:
@@ -370,6 +370,29 @@ class ModSettings(MixinMeta):
|
||||
_("Bot will no longer attempt to send a DM to user before kick and ban.")
|
||||
)
|
||||
|
||||
@modset.command()
|
||||
@commands.guild_only()
|
||||
async def requirereason(self, ctx: commands.Context, enabled: bool = None):
|
||||
"""
|
||||
Toggle whether a reason is required for mod actions.
|
||||
|
||||
If this is enabled, the bot will require a reason to be provided for all mod actions.
|
||||
"""
|
||||
guild = ctx.guild
|
||||
if enabled is None:
|
||||
setting = await self.config.guild(guild).require_reason()
|
||||
await ctx.send(
|
||||
_("Mod action reason requirement is currently set to: {setting}").format(
|
||||
setting=setting
|
||||
)
|
||||
)
|
||||
return
|
||||
await self.config.guild(guild).require_reason.set(enabled)
|
||||
if enabled:
|
||||
await ctx.send(_("Bot will now require a reason for all mod actions."))
|
||||
else:
|
||||
await ctx.send(_("Bot will no longer require a reason for all mod actions."))
|
||||
|
||||
@modset.command()
|
||||
@commands.guild_only()
|
||||
async def defaultdays(self, ctx: commands.Context, days: int = 0):
|
||||
|
||||
Reference in New Issue
Block a user