fix: fixed shortmuteset message command
This commit is contained in:
parent
ebb8a6c85c
commit
d38535a35e
1 changed files with 3 additions and 5 deletions
|
@ -315,10 +315,8 @@ class Shortmute(commands.Cog):
|
||||||
enabled: bool (optional)
|
enabled: bool (optional)
|
||||||
This parameter, if set, will toggle this setting to either True or False."""
|
This parameter, if set, will toggle this setting to either True or False."""
|
||||||
old_value = await self.config.guild(ctx.guild).dm()
|
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 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}`")
|
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!")
|
|
||||||
|
|
Loading…
Reference in a new issue