fix: fixed shortmuteset message command

This commit is contained in:
Seaswimmer 2023-08-10 15:59:57 -04:00
parent ebb8a6c85c
commit d38535a35e
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -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!")