From d38535a35edeb2d37f5715985dea32f001891119 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 10 Aug 2023 15:59:57 -0400 Subject: [PATCH] fix: fixed shortmuteset message command --- shortmute/shortmute.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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!")