diff options
| author | 2021-01-26 19:41:20 +0200 | |
|---|---|---|
| committer | 2021-01-26 19:41:20 +0200 | |
| commit | 76574adda0e4a033b93b976278904d796ef055aa (patch) | |
| tree | 3ad569ee8b4aeb32a86a68ba25d908990dfb7e53 | |
| parent | Moved self.enabled update to _defcon_action (diff) | |
Moved channel topic change to _defcon_action
| -rw-r--r-- | bot/exts/moderation/defcon.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bot/exts/moderation/defcon.py b/bot/exts/moderation/defcon.py index f34f8fa28..1e88a8d9c 100644 --- a/bot/exts/moderation/defcon.py +++ b/bot/exts/moderation/defcon.py @@ -166,6 +166,7 @@ class Defcon(Cog): await ctx.send(self.build_defcon_msg(action, error)) await self.send_defcon_log(action, ctx.author, error) + await self.update_channel_topic() self.bot.stats.gauge("defcon.threshold", days) @@ -179,14 +180,12 @@ class Defcon(Cog): in days. """ await self._defcon_action(ctx, days=0, action=Action.ENABLED) - await self.update_channel_topic() @defcon_group.command(name='disable', aliases=('off', 'd'), root_aliases=("defoff",)) @has_any_role(*MODERATION_ROLES) async def disable_command(self, ctx: Context) -> None: """Disable DEFCON mode. Useful in a pinch, but be sure you know what you're doing!""" await self._defcon_action(ctx, days=0, action=Action.DISABLED) - await self.update_channel_topic() @defcon_group.command(name='status', aliases=('s',)) @has_any_role(*MODERATION_ROLES) @@ -205,7 +204,6 @@ class Defcon(Cog): async def days_command(self, ctx: Context, days: int) -> None: """Set how old an account must be to join the server, in days, with DEFCON mode enabled.""" await self._defcon_action(ctx, days=days, action=Action.UPDATED) - await self.update_channel_topic() async def update_channel_topic(self) -> None: """Update the #defcon channel topic with the current DEFCON status.""" |