aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Ben Soyka <[email protected]>2021-11-27 15:57:49 -0700
committerGravatar Ben Soyka <[email protected]>2021-11-27 15:57:49 -0700
commit68f27b730c27d58805556291f833030d37446425 (patch)
tree566813d860cf15203e2239c55f1729b1369bc1f8
parentSuppress NotFound error when cleaning messages (diff)
Limit length of the invalid rule indices message
-rw-r--r--bot/exts/info/site.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/exts/info/site.py b/bot/exts/info/site.py
index e8e71558b..3b4b561c7 100644
--- a/bot/exts/info/site.py
+++ b/bot/exts/info/site.py
@@ -1,3 +1,5 @@
+from textwrap import shorten
+
from discord import Colour, Embed
from discord.ext.commands import Cog, Context, Greedy, group
@@ -123,7 +125,7 @@ class Site(Cog):
# Remove duplicates and sort the rule indices
rules = sorted(set(rules))
- invalid = ', '.join(str(index) for index in rules if index < 1 or index > len(full_rules))
+ invalid = shorten(', '.join(str(index) for index in rules if index < 1 or index > len(full_rules)), 50)
if invalid:
await ctx.send(f":x: Invalid rule indices: {invalid}")