aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2020-04-06 08:48:32 +0300
committerGravatar ks129 <[email protected]>2020-04-06 08:48:32 +0300
commit025857541b7a0cbb77adf2a0282873c9e116169a (patch)
tree644aeecbeabb7b94fe87c00ffd5265b9b220d7ec
parent(Mod Scheduler): Added reason truncations to Scheduler's `apply_infraction` (diff)
(Ban and Kick): Changed length in `textwrap.shorten` from 309 to 312 because shorten already include `placeholder` to length.
Diffstat (limited to '')
-rw-r--r--bot/cogs/moderation/infractions.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/cogs/moderation/infractions.py b/bot/cogs/moderation/infractions.py
index 5bdea5755..7a044fc1c 100644
--- a/bot/cogs/moderation/infractions.py
+++ b/bot/cogs/moderation/infractions.py
@@ -229,7 +229,7 @@ class Infractions(InfractionScheduler, commands.Cog):
if len(reason) > 512:
log.info("Kick reason is longer than 512 characters. Reason will be truncated for Audit Log.")
- action = user.kick(reason=textwrap.shorten(reason, width=509, placeholder="..."))
+ action = user.kick(reason=textwrap.shorten(reason, width=512, placeholder="..."))
await self.apply_infraction(ctx, infraction, user, action)
@respect_role_hierarchy()
@@ -253,7 +253,7 @@ class Infractions(InfractionScheduler, commands.Cog):
action = ctx.guild.ban(
user,
- reason=textwrap.shorten(reason, width=509, placeholder="..."),
+ reason=textwrap.shorten(reason, width=512, placeholder="..."),
delete_message_days=0
)
await self.apply_infraction(ctx, infraction, user, action)