feat: add /bcs-pause command to toggle monitoring
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -161,6 +161,31 @@ class CommandsCog(commands.Cog):
|
||||
|
||||
await interaction.response.send_message(embed=embed, ephemeral=True)
|
||||
|
||||
@app_commands.command(
|
||||
name="bcs-pause",
|
||||
description="Pause or resume bot monitoring. (Admin only)",
|
||||
)
|
||||
@app_commands.default_permissions(administrator=True)
|
||||
async def bcs_pause(self, interaction: discord.Interaction):
|
||||
if not self._is_admin(interaction):
|
||||
await interaction.response.send_message(
|
||||
"Admin only.", ephemeral=True
|
||||
)
|
||||
return
|
||||
|
||||
monitoring = self.bot.config.setdefault("monitoring", {})
|
||||
currently_enabled = monitoring.get("enabled", True)
|
||||
monitoring["enabled"] = not currently_enabled
|
||||
|
||||
if monitoring["enabled"]:
|
||||
await interaction.response.send_message(
|
||||
"Monitoring **resumed**.", ephemeral=True
|
||||
)
|
||||
else:
|
||||
await interaction.response.send_message(
|
||||
"Monitoring **paused**.", ephemeral=True
|
||||
)
|
||||
|
||||
@app_commands.command(
|
||||
name="bcs-threshold",
|
||||
description="Adjust warning and mute thresholds. (Admin only)",
|
||||
|
||||
Reference in New Issue
Block a user