aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Amrou Bellalouna <[email protected]>2022-09-18 16:11:10 +0100
committerGravatar Amrou Bellalouna <[email protected]>2022-09-18 16:11:10 +0100
commit3119585850d01957d074862d25d01b78eb7fc438 (patch)
tree2f47001b0b1b1bfc12b7d0ef30b8b6ea7fa2a910
parentstop matching keywords when they're invalid upon triaging the rule numbers & ... (diff)
rename index to rule_number
-rw-r--r--bot/exts/info/information.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/exts/info/information.py b/bot/exts/info/information.py
index cd1f0f957..52cc79aa0 100644
--- a/bot/exts/info/information.py
+++ b/bot/exts/info/information.py
@@ -558,7 +558,9 @@ class Information(Cog):
# Remove duplicate keywords and preserve the order of initial keywords
keywords = list(dict.fromkeys(keywords))
- invalid = ", ".join(str(index) for index in rule_numbers if index < 1 or index > len(full_rules))
+ invalid = ", ".join(
+ str(rule_number) for rule_number in rule_numbers
+ if rule_number < 1 or rule_number > len(full_rules))
if invalid:
await ctx.send(shorten(":x: Invalid rule indices: " + invalid, 75, placeholder=" ..."))