Skip to content

Commit 61cf1f8

Browse files
committed
feat(implement:AutoMod): Added min_length and max_length to __eq__ check
1 parent 0802deb commit 61cf1f8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

discord/application_commands.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ def check_options(_options: list, _other: list):
324324
if not check_options(option.get('options', []), opt.get('options', [])):
325325
return False
326326
for key in ('type', 'name', 'name_localizations', 'description', 'description_localizations',
327-
'required', 'choices', 'min_value', 'max_value', 'autocomplete'):
327+
'required', 'choices', 'min_value', 'max_value', 'min_length', 'max_length',
328+
'autocomplete'):
328329
current_value = option.get(key, None)
329330
if current_value != opt.get(key, None):
330331
return False
@@ -1827,4 +1828,4 @@ def generate_options(
18271828
default=default,
18281829
converter=converter)
18291830
)
1830-
return options
1831+
return options

0 commit comments

Comments
 (0)