@@ -396,12 +396,10 @@ def from_dict(cls, data: dict):
396396
397397
398398class SelectOption :
399-
400399 """
401- A class that creates an option for a :class:`SelectMenu`
402- and represents it in a :class:`SelectMenu` in the components of a :class:`discord.Message`.
400+ A class that represents an option for a :class:`SelectMenu`
403401
404- Parameters
402+ Attributes
405403 ----------
406404 label: :class:`str`
407405 the user-facing name of the option, max 25 characters
@@ -413,21 +411,25 @@ class SelectOption:
413411 an Emoji that will be shown on the left side of the option.
414412 default: Optional[:class:`bool`] = False
415413 will render this option as selected by default
416-
414+
415+ Raises
416+ ------
417+ :exc:`ValueError`
418+ One of ``label``, ``value`` or ``description`` is too long.
417419 """
418420 def __init__ (self , label : str ,
419421 value : str ,
420422 description : str = None ,
421423 emoji : Union [PartialEmoji , Emoji , str ] = None ,
422424 default : bool = False ):
423425 if len (label ) > 100 :
424- raise AttributeError ('The maximum length of the label is 100 characters.' )
426+ raise ValueError ('The maximum length of the label is 100 characters.' )
425427 self .label = label
426428 if len (value ) > 100 :
427- raise AttributeError ('The maximum length of the value is 100 characters.' )
429+ raise ValueError ('The maximum length of the value is 100 characters.' )
428430 self .value = value
429431 if description and len (description ) > 100 :
430- raise AttributeError ('The maximum length of the description is 100 characters.' )
432+ raise ValueError ('The maximum length of the description is 100 characters.' )
431433 self .description = description
432434 if isinstance (emoji , PartialEmoji ):
433435 self .emoji = emoji
0 commit comments