aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2020-07-24 10:07:20 +0200
committerGravatar Leon Sandøy <[email protected]>2020-07-24 10:07:20 +0200
commit6f066fe2e18495425f6fbe90518d25b00b4276b4 (patch)
tree8a60119c26288b3a0b53de45e51b0ac07a4369f6
parentCatch ResponseCodeError in the ValidAllowDenyListType converter. (diff)
Put valid_types_list inside the conditional.
-rw-r--r--bot/converters.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/converters.py b/bot/converters.py
index 55cc630f7..41cd3f3e5 100644
--- a/bot/converters.py
+++ b/bot/converters.py
@@ -88,10 +88,10 @@ class ValidAllowDenyListType(Converter):
raise BadArgument("Cannot validate list_type: Unable to fetch valid types from API.")
valid_types = [enum for enum, classname in valid_types]
- valid_types_list = '\n'.join([f"• {type_.lower()}" for type_ in valid_types])
list_type = list_type.upper()
if list_type not in valid_types:
+ valid_types_list = '\n'.join([f"• {type_.lower()}" for type_ in valid_types])
raise BadArgument(
f"You have provided an invalid list type!\n\n"
f"Please provide one of the following: \n{valid_types_list}"