diff options
| author | 2021-03-17 17:42:04 +0800 | |
|---|---|---|
| committer | 2021-03-17 17:42:04 +0800 | |
| commit | b3ac1ee73fc5058f9beb77f248a198376f7bae47 (patch) | |
| tree | 07450a8fe40582bcdbef9538552dfb2f48d2d0e0 | |
| parent | Code block: remove null bytes before parsing AST (diff) | |
| parent | Merge pull request #1468 from python-discord/bug/info/bot-xk/defcon-threshold... (diff) | |
Merge branch 'main' into bug/info/bot-xr/code-block-null-byte
Diffstat (limited to '')
| -rw-r--r-- | bot/exts/info/information.py | 3 | ||||
| -rw-r--r-- | bot/exts/moderation/defcon.py | 4 | 
2 files changed, 4 insertions, 3 deletions
| diff --git a/bot/exts/info/information.py b/bot/exts/info/information.py index 92ddf0fbd..c54ca96bf 100644 --- a/bot/exts/info/information.py +++ b/bot/exts/info/information.py @@ -64,7 +64,8 @@ class Information(Cog):          defcon_info = ""          if cog := self.bot.get_cog("Defcon"): -            defcon_info = f"Defcon threshold: {humanize_delta(cog.threshold)}\n" +            threshold = humanize_delta(cog.threshold) if cog.threshold else "-" +            defcon_info = f"Defcon threshold: {threshold}\n"          verification = f"Verification level: {ctx.guild.verification_level.name}\n" diff --git a/bot/exts/moderation/defcon.py b/bot/exts/moderation/defcon.py index bd16289b9..bab95405c 100644 --- a/bot/exts/moderation/defcon.py +++ b/bot/exts/moderation/defcon.py @@ -157,9 +157,9 @@ class Defcon(Cog):          await ctx.send(embed=embed) -    @defcon_group.command(aliases=('t', 'd')) +    @defcon_group.command(name="threshold", aliases=('t', 'd'))      @has_any_role(*MODERATION_ROLES) -    async def threshold( +    async def threshold_command(          self, ctx: Context, threshold: Union[DurationDelta, int], expiry: Optional[Expiry] = None      ) -> None:          """ | 
