aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2020-04-08 09:16:36 +0300
committerGravatar ks129 <[email protected]>2020-04-08 09:16:36 +0300
commit10ea74bc5ed390c36d64a0f7413b8422f158708a (patch)
treee88e5a1d9e50168acf21bbacc334354456dc78c5
parent(Infractions): Moved truncated reason to variable instead on ban coroutine cr... (diff)
(Superstarify, Scheduler): Added reason shortening for ModLog.
-rw-r--r--bot/cogs/moderation/scheduler.py2
-rw-r--r--bot/cogs/moderation/superstarify.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/bot/cogs/moderation/scheduler.py b/bot/cogs/moderation/scheduler.py
index 45e9d58ad..7404ec8ac 100644
--- a/bot/cogs/moderation/scheduler.py
+++ b/bot/cogs/moderation/scheduler.py
@@ -326,7 +326,7 @@ class InfractionScheduler(Scheduler):
log_text = {
"Member": f"<@{user_id}>",
"Actor": str(self.bot.get_user(actor) or actor),
- "Reason": infraction["reason"],
+ "Reason": textwrap.shorten(infraction["reason"], width=1500, placeholder="..."),
"Created": created,
}
diff --git a/bot/cogs/moderation/superstarify.py b/bot/cogs/moderation/superstarify.py
index ca3dc4202..d77e61e6b 100644
--- a/bot/cogs/moderation/superstarify.py
+++ b/bot/cogs/moderation/superstarify.py
@@ -183,7 +183,7 @@ class Superstarify(InfractionScheduler, Cog):
text=textwrap.dedent(f"""
Member: {member.mention} (`{member.id}`)
Actor: {ctx.message.author}
- Reason: {reason}
+ Reason: {textwrap.shorten(reason, width=1500, placeholder="...")}
Expires: {expiry_str}
Old nickname: `{old_nick}`
New nickname: `{forced_nick}`