Skip to content

Commit d7cf79d

Browse files
authored
fix(automod): Fix a TypeError related to custom_message
Signed-off-by: Mathieu <[email protected]>
1 parent 20c5a8e commit d7cf79d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

discord/automod.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def __init__(self, type: AutoModActionType, **metadata):
141141
except KeyError:
142142
pass
143143
else:
144-
if len(custom_message) > 150:
144+
if custom_message and len(custom_message) > 150:
145145
raise ValueError('The maximum length of the custom message is 150 characters.')
146146
self.custom_message: Optional[str] = custom_message
147147

0 commit comments

Comments
 (0)