diff --git a/shortmute/shortmute.py b/shortmute/shortmute.py index 54be666..0ae46a9 100644 --- a/shortmute/shortmute.py +++ b/shortmute/shortmute.py @@ -315,10 +315,8 @@ class Shortmute(commands.Cog): enabled: bool (optional) This parameter, if set, will toggle this setting to either True or False.""" old_value = await self.config.guild(ctx.guild).dm() - if enabled: + if enabled is None: + await ctx.send(content=f"Shortmute Direct Messages are currently {'enabled' if old_value else 'disabled'}!") + else: await self.config.guild(ctx.guild).dm.set(enabled) await ctx.send(content=f"Shortmute Direct Message setting changed!\nOld value: `{old_value}`\nNew value: `{enabled}`") - elif old_value is True: - await ctx.send(content="Shortmute Direct Messages are currently enabled!") - elif old_value is False: - await ctx.send(content="Shortmute Direct Messages are currently disabled!")