escape markdown for warn reasons in warn commands
@@ -110,7 +110,7 @@ class Mod(commands.Cog):
for entry in await ctx.guild.bans():
if entry[1].id == user.id:
- await ctx.guild.unban(user, reason=f"{ctx.author} | {reason}")
+ await ctx.guild.unban(user, reason=f"{ctx.author} | *{discord.utils.escape_markdown(reason)}*")
await ctx.message.add_reaction(self.d.emojis.yes)
return
@@ -140,7 +140,7 @@ class Mod(commands.Cog):
await self.db.add_warn(user.id, ctx.guild.id, ctx.author.id, reason)
- await self.bot.send(ctx, ctx.l.mod.warn.confirm.format(self.d.emojis.yes, user.mention, len(warns) + 1, reason))
+ await self.bot.send(ctx, ctx.l.mod.warn.confirm.format(self.d.emojis.yes, user.mention, len(warns) + 1, discord.utils.escape_markdown(reason)))
@commands.command(name="warns", aliases=["warnings", "karens"])
@commands.guild_only()
