misc(moderation): changed all instances of timeout to mute
Some checks failed
Pylint / Pylint (push) Failing after 1m12s
Some checks failed
Pylint / Pylint (push) Failing after 1m12s
This commit is contained in:
parent
57f49d8e42
commit
9f1d864b31
1 changed files with 5 additions and 5 deletions
|
@ -80,9 +80,9 @@ class Moderation(commands.Cog):
|
|||
duration_datetime = timed_out_until_aware - datetime.now(tz=timezone.utc)
|
||||
minutes = round(duration_datetime.total_seconds() / 60)
|
||||
duration = timedelta(minutes=minutes)
|
||||
moderation_type = 'TIMEOUT'
|
||||
moderation_type = 'MUTE'
|
||||
else:
|
||||
moderation_type = 'UNTIMEOUT'
|
||||
moderation_type = 'UNMUTE'
|
||||
else:
|
||||
return
|
||||
await self.mysql_log(entry.guild.id, entry.user.id, moderation_type, entry.target.id, duration, reason)
|
||||
|
@ -182,14 +182,14 @@ class Moderation(commands.Cog):
|
|||
await ctx.message.reply(f"Please provide a valid duration!\nSee `{ctx.prefix}tdc`")
|
||||
return
|
||||
await target.timeout(parsed_time)
|
||||
response = await ctx.send(content=f"{target.mention} has been timed out for {str(parsed_time)}!\n**Reason** - `{reason}`")
|
||||
response = await ctx.send(content=f"{target.mention} has been muted for {str(parsed_time)}!\n**Reason** - `{reason}`")
|
||||
try:
|
||||
embed = discord.Embed(title="Timed Out", description=f"You have been timed out for `{str(parsed_time)}` in {ctx.guild.name}.", color=await self.bot.get_embed_color(None))
|
||||
embed = discord.Embed(title="Muted", description=f"You have been muted for `{str(parsed_time)}` in {ctx.guild.name}.", color=await self.bot.get_embed_color(None))
|
||||
embed.add_field(name='Reason', value=f"`{reason}`")
|
||||
await target.send(embed=embed)
|
||||
except discord.errors.HTTPException:
|
||||
await response.edit(content=f"{response.content}\n*Failed to send DM, user likely has the bot blocked.*")
|
||||
self.mysql_log(ctx.guild.id, ctx.author.id, 'TIMEOUT', target.id, parsed_time, reason)
|
||||
self.mysql_log(ctx.guild.id, ctx.author.id, 'MUTE', target.id, parsed_time, reason)
|
||||
|
||||
@commands.group(autohelp=True)
|
||||
@checks.admin()
|
||||
|
|
Loading…
Reference in a new issue