diff options
author | 2021-11-27 16:33:42 -0700 | |
---|---|---|
committer | 2021-11-27 16:33:42 -0700 | |
commit | d870f28027c708fef3f0e1cc035196e727485cce (patch) | |
tree | c5de7be8afa76736a7b0b76f900ed5820eb65308 | |
parent | Add missing space in text shortening placeholder (diff) |
Refactor long line
Doing this similar to how the docs command works for shortening
-rw-r--r-- | bot/exts/info/site.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/exts/info/site.py b/bot/exts/info/site.py index c622441bd..f6499ecce 100644 --- a/bot/exts/info/site.py +++ b/bot/exts/info/site.py @@ -125,11 +125,11 @@ class Site(Cog): # Remove duplicates and sort the rule indices rules = sorted(set(rules)) - invalid = shorten(', '.join(str(index) for index in rules if index - < 1 or index > len(full_rules)), 50, placeholder=' ...') + + invalid = ', '.join(str(index) for index in rules if index < 1 or index > len(full_rules)) if invalid: - await ctx.send(f":x: Invalid rule indices: {invalid}") + await ctx.send(shorten(":x: Invalid rule indices: " + invalid, 75, placeholder=' ...')) return for rule in rules: |