Objects¶
Button¶
button
¶
Button
dataclass
¶
Bases: Component, ActionRowChild, SectionAccessoryChild
flowchart TD
scurrypy.api.components.button.Button[Button]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.ActionRowChild[ActionRowChild]
scurrypy.bases.components.SectionAccessoryChild[SectionAccessoryChild]
scurrypy.bases.components.Component --> scurrypy.api.components.button.Button
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
scurrypy.bases.components.ActionRowChild --> scurrypy.api.components.button.Button
scurrypy.bases.components.SectionAccessoryChild --> scurrypy.api.components.button.Button
click scurrypy.api.components.button.Button href "" "scurrypy.api.components.button.Button"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
click scurrypy.bases.components.ActionRowChild href "" "scurrypy.bases.components.ActionRowChild"
click scurrypy.bases.components.SectionAccessoryChild href "" "scurrypy.bases.components.SectionAccessoryChild"
Represents the Button component.
A pressable button!
style: ButtonStyle | None = None
class-attribute
instance-attribute
¶
A button style.
custom_id: str | None = None
class-attribute
instance-attribute
¶
ID for the button. Do not supply for ButtonStyles.LINK style buttons.
label: str | None = None
class-attribute
instance-attribute
¶
Text that appears on the button.
emoji: EmojiModel | None = None
class-attribute
instance-attribute
¶
Emoji icon for the button.
url: str | None = None
class-attribute
instance-attribute
¶
URL for link-style buttons.
disabled: bool | None = None
class-attribute
instance-attribute
¶
Whether the button is disabled. Discord defaults to False.
link: str | None = None
class-attribute
instance-attribute
¶
Hyperlink for button. For ButtonStyles.LINK style only.
type: ComponentType = field(init=False, default=(ComponentType.BUTTON))
class-attribute
instance-attribute
¶
Component type. Always ComponentType.BUTTON for this class.
Layout¶
layout
¶
ActionRow
dataclass
¶
Bases: Component
flowchart TD
scurrypy.api.components.layout.ActionRow[ActionRow]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.Component --> scurrypy.api.components.layout.ActionRow
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
click scurrypy.api.components.layout.ActionRow href "" "scurrypy.api.components.layout.ActionRow"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
Represents a container of interactable components.
Section
dataclass
¶
Bases: Component, ContainerChild
flowchart TD
scurrypy.api.components.layout.Section[Section]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.ContainerChild[ContainerChild]
scurrypy.bases.components.Component --> scurrypy.api.components.layout.Section
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
scurrypy.bases.components.ContainerChild --> scurrypy.api.components.layout.Section
click scurrypy.api.components.layout.Section href "" "scurrypy.api.components.layout.Section"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
click scurrypy.bases.components.ContainerChild href "" "scurrypy.bases.components.ContainerChild"
Represents the Section component.
A Section contextually associates content with an accessory component.
accessory: Component | None = None
class-attribute
instance-attribute
¶
A component that is contextually associated to the content of the section.
Supports SectionAccessoryChild components.
components: list[Component] | None = None
class-attribute
instance-attribute
¶
Component(s) representing the content of the section that is contextually associated to the accessory.
Supports SectionChild components.
type: ComponentType = field(init=False, default=(ComponentType.SECTION))
class-attribute
instance-attribute
¶
Component type. Always ComponentType.SECTION for this class.
TextDisplay
dataclass
¶
Bases: Component, ContainerChild, SectionChild
flowchart TD
scurrypy.api.components.layout.TextDisplay[TextDisplay]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.ContainerChild[ContainerChild]
scurrypy.bases.components.SectionChild[SectionChild]
scurrypy.bases.components.Component --> scurrypy.api.components.layout.TextDisplay
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
scurrypy.bases.components.ContainerChild --> scurrypy.api.components.layout.TextDisplay
scurrypy.bases.components.SectionChild --> scurrypy.api.components.layout.TextDisplay
click scurrypy.api.components.layout.TextDisplay href "" "scurrypy.api.components.layout.TextDisplay"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
click scurrypy.bases.components.ContainerChild href "" "scurrypy.bases.components.ContainerChild"
click scurrypy.bases.components.SectionChild href "" "scurrypy.bases.components.SectionChild"
Represents the Text Display component.
A Text Display adds markdown formatted text, including mentions (users, roles, etc) and emojis.
Thumbnail
dataclass
¶
Bases: Component, SectionAccessoryChild
flowchart TD
scurrypy.api.components.layout.Thumbnail[Thumbnail]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.SectionAccessoryChild[SectionAccessoryChild]
scurrypy.bases.components.Component --> scurrypy.api.components.layout.Thumbnail
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
scurrypy.bases.components.SectionAccessoryChild --> scurrypy.api.components.layout.Thumbnail
click scurrypy.api.components.layout.Thumbnail href "" "scurrypy.api.components.layout.Thumbnail"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
click scurrypy.bases.components.SectionAccessoryChild href "" "scurrypy.bases.components.SectionAccessoryChild"
Represents the Thumbnail component.
A Thumbnail displays visual media in a small form-factor.
media: str | None = None
class-attribute
instance-attribute
¶
Media of the thumbnail. http or attachment://
description: str | None = None
class-attribute
instance-attribute
¶
Description for the media.
spoiler: bool | None = None
class-attribute
instance-attribute
¶
Whether the thumbnail should be a spoiler (or blurred out). Discord defaults to False.
type: ComponentType = field(init=False, default=(ComponentType.THUMBNAIL))
class-attribute
instance-attribute
¶
Component type. Always ComponentType.THUMBNAIL for this class.
MediaGalleryItem
dataclass
¶
Bases: DataModel
flowchart TD
scurrypy.api.components.layout.MediaGalleryItem[MediaGalleryItem]
scurrypy.core.model.DataModel[DataModel]
scurrypy.core.model.DataModel --> scurrypy.api.components.layout.MediaGalleryItem
click scurrypy.api.components.layout.MediaGalleryItem href "" "scurrypy.api.components.layout.MediaGalleryItem"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
Represents the Media Gallery Item component.
media: str | None = None
class-attribute
instance-attribute
¶
Image data. http or attachment://
description: str | None = None
class-attribute
instance-attribute
¶
Alt text for the media.
spoiler: bool | None = None
class-attribute
instance-attribute
¶
Whether the thumbnail should be a spoiler (or blurred out). Discord defaults to False.
MediaGallery
dataclass
¶
Bases: Component, ContainerChild
flowchart TD
scurrypy.api.components.layout.MediaGallery[MediaGallery]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.ContainerChild[ContainerChild]
scurrypy.bases.components.Component --> scurrypy.api.components.layout.MediaGallery
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
scurrypy.bases.components.ContainerChild --> scurrypy.api.components.layout.MediaGallery
click scurrypy.api.components.layout.MediaGallery href "" "scurrypy.api.components.layout.MediaGallery"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
click scurrypy.bases.components.ContainerChild href "" "scurrypy.bases.components.ContainerChild"
Represents the Media Gallery component.
A Media Gallery displays 1-10 media attachments in an organized gallery format.
File
dataclass
¶
Bases: Component, ContainerChild
flowchart TD
scurrypy.api.components.layout.File[File]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.ContainerChild[ContainerChild]
scurrypy.bases.components.Component --> scurrypy.api.components.layout.File
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
scurrypy.bases.components.ContainerChild --> scurrypy.api.components.layout.File
click scurrypy.api.components.layout.File href "" "scurrypy.api.components.layout.File"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
click scurrypy.bases.components.ContainerChild href "" "scurrypy.bases.components.ContainerChild"
Represents the File component.
A File displays an uploaded file as an attachment to the message and reference it in the component.
file: str | None = None
class-attribute
instance-attribute
¶
File name. ONLY supports attachment://
spoiler: bool | None = None
class-attribute
instance-attribute
¶
Whether the thumbnail should be a spoiler (or blurred out). Discord defaults to False.
type: ComponentType = field(init=False, default=(ComponentType.FILE))
class-attribute
instance-attribute
¶
Component type. Always ComponentType.FILE for this class.
Separator
dataclass
¶
Bases: Component, ContainerChild
flowchart TD
scurrypy.api.components.layout.Separator[Separator]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.ContainerChild[ContainerChild]
scurrypy.bases.components.Component --> scurrypy.api.components.layout.Separator
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
scurrypy.bases.components.ContainerChild --> scurrypy.api.components.layout.Separator
click scurrypy.api.components.layout.Separator href "" "scurrypy.api.components.layout.Separator"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
click scurrypy.bases.components.ContainerChild href "" "scurrypy.bases.components.ContainerChild"
Represents the Separator component.
A Separator adds vertical padding and visual division between other components.
divider: bool | None = None
class-attribute
instance-attribute
¶
Whether a visual divider should be displayed in the component. Discord defaults to True.
spacing: SeparatorType | None = None
class-attribute
instance-attribute
¶
Size of separator padding. Discord defaults to SeparatorType.SMALL_PADDING.
type: ComponentType = field(init=False, default=(ComponentType.SEPARATOR))
class-attribute
instance-attribute
¶
Component type. Always ComponentType.SEPARATOR for this class.
Container
dataclass
¶
Bases: Component
flowchart TD
scurrypy.api.components.layout.Container[Container]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.Component --> scurrypy.api.components.layout.Container
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
click scurrypy.api.components.layout.Container href "" "scurrypy.api.components.layout.Container"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
Represents a container of display and interactable components.
A Container visually encapsulates a collection of components.
components: list[Component] | None = None
class-attribute
instance-attribute
¶
Child components that are encapsulated within the Container.
Supports ContainerChild components.
accent_color: int | None = None
class-attribute
instance-attribute
¶
Color for the accent as an integer.
spoiler: bool | None = None
class-attribute
instance-attribute
¶
If the container should be blurred out. Discord defaults to False.
type: ComponentType = field(init=False, default=(ComponentType.CONTAINER))
class-attribute
instance-attribute
¶
Component type. Always ComponentType.CONTAINER for this class.
Label
dataclass
¶
Bases: Component
flowchart TD
scurrypy.api.components.layout.Label[Label]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.Component --> scurrypy.api.components.layout.Label
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
click scurrypy.api.components.layout.Label href "" "scurrypy.api.components.layout.Label"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
Represents the Discord Label component.
Labels wrap modal components with text as a label and optional description.
label: str | None = None
class-attribute
instance-attribute
¶
Label text.
component: Component | None = None
class-attribute
instance-attribute
¶
A component within the label.
Supports LabelChild components.
description: str | None = None
class-attribute
instance-attribute
¶
An optional description text for the label.
type: ComponentType = field(init=False, default=(ComponentType.LABEL))
class-attribute
instance-attribute
¶
Component type. Always ComponentType.LABEL for this class.
Modal¶
modal
¶
TextInput
dataclass
¶
Bases: Component, LabelChild
flowchart TD
scurrypy.api.components.modal.TextInput[TextInput]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.LabelChild[LabelChild]
scurrypy.bases.components.Component --> scurrypy.api.components.modal.TextInput
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
scurrypy.bases.components.LabelChild --> scurrypy.api.components.modal.TextInput
click scurrypy.api.components.modal.TextInput href "" "scurrypy.api.components.modal.TextInput"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
click scurrypy.bases.components.LabelChild href "" "scurrypy.bases.components.LabelChild"
Represents the Text Input component.
A Text Input allows users to enter free-form text.
custom_id: str | None = None
class-attribute
instance-attribute
¶
ID for the input.
style: TextInputStyle | None = None
class-attribute
instance-attribute
¶
Text input style.
min_length: int | None = None
class-attribute
instance-attribute
¶
Minimum input length for a text input.
max_length: int | None = None
class-attribute
instance-attribute
¶
Maximum input length for a text input.
required: bool | None = None
class-attribute
instance-attribute
¶
Whether this component is required to be filled. Discord defaults to True.
value: str | None = None
class-attribute
instance-attribute
¶
Pre-filled value for this component.
placeholder: str | None = None
class-attribute
instance-attribute
¶
Custom placeholder text if the input is empty.
type: ComponentType = field(init=False, default=(ComponentType.TEXT_INPUT))
class-attribute
instance-attribute
¶
Component type. Always ComponentType.TEXT_INPUT for this class.
FileUpload
dataclass
¶
Bases: Component, LabelChild
flowchart TD
scurrypy.api.components.modal.FileUpload[FileUpload]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.LabelChild[LabelChild]
scurrypy.bases.components.Component --> scurrypy.api.components.modal.FileUpload
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
scurrypy.bases.components.LabelChild --> scurrypy.api.components.modal.FileUpload
click scurrypy.api.components.modal.FileUpload href "" "scurrypy.api.components.modal.FileUpload"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
click scurrypy.bases.components.LabelChild href "" "scurrypy.bases.components.LabelChild"
Represents the file upload component.
File Upload allows users to upload files in modals.
custom_id: str | None = None
class-attribute
instance-attribute
¶
ID for the file upload.
min_values: int | None = None
class-attribute
instance-attribute
¶
Minimum number of items that must be uploaded. Discord defaults to 1.
max_values: int | None = None
class-attribute
instance-attribute
¶
Maximum number of items that can be uploaded. Discord defaults to 1.
required: bool | None = None
class-attribute
instance-attribute
¶
Whether files are required to be uploaded. Discord defaults to True.
type: ComponentType = field(init=False, default=(ComponentType.FILE_UPLOAD))
class-attribute
instance-attribute
¶
Component type. Always ComponentType.FILE_UPLOAD for this class.
ListOption
dataclass
¶
Bases: DataModel
flowchart TD
scurrypy.api.components.modal.ListOption[ListOption]
scurrypy.core.model.DataModel[DataModel]
scurrypy.core.model.DataModel --> scurrypy.api.components.modal.ListOption
click scurrypy.api.components.modal.ListOption href "" "scurrypy.api.components.modal.ListOption"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
Represents an option in a group or checkbox group component.
value: str | None = None
class-attribute
instance-attribute
¶
ID for the option.
label: str | None = None
class-attribute
instance-attribute
¶
User-facing label for the option.
description: str | None = None
class-attribute
instance-attribute
¶
Description for the option.
default: bool | None = None
class-attribute
instance-attribute
¶
Whether to show this option as selected by default.
RadioGroup
dataclass
¶
Bases: Component, LabelChild
flowchart TD
scurrypy.api.components.modal.RadioGroup[RadioGroup]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.LabelChild[LabelChild]
scurrypy.bases.components.Component --> scurrypy.api.components.modal.RadioGroup
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
scurrypy.bases.components.LabelChild --> scurrypy.api.components.modal.RadioGroup
click scurrypy.api.components.modal.RadioGroup href "" "scurrypy.api.components.modal.RadioGroup"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
click scurrypy.bases.components.LabelChild href "" "scurrypy.bases.components.LabelChild"
Represents the radio group component.
A Radio Group is for selecting exactly one option from a defined list.
custom_id: str | None = None
class-attribute
instance-attribute
¶
ID for the radio group.
options: list[ListOption] | None = None
class-attribute
instance-attribute
¶
List of options to show.
required: bool | None = None
class-attribute
instance-attribute
¶
Whether a selection is required for submission. Discord defaults to True.
type: ComponentType = field(init=False, default=(ComponentType.RADIO_GROUP))
class-attribute
instance-attribute
¶
Component type. Always ComponentType.RADIO_GROUP for this class.
CheckboxGroup
dataclass
¶
Bases: Component, LabelChild
flowchart TD
scurrypy.api.components.modal.CheckboxGroup[CheckboxGroup]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.LabelChild[LabelChild]
scurrypy.bases.components.Component --> scurrypy.api.components.modal.CheckboxGroup
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
scurrypy.bases.components.LabelChild --> scurrypy.api.components.modal.CheckboxGroup
click scurrypy.api.components.modal.CheckboxGroup href "" "scurrypy.api.components.modal.CheckboxGroup"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
click scurrypy.bases.components.LabelChild href "" "scurrypy.bases.components.LabelChild"
Represents the checkbox group component.
A Checkbox Group is for selecting one or many options via checkboxes.
custom_id: str | None = None
class-attribute
instance-attribute
¶
ID for the checkbox group.
options: list[ListOption] | None = None
class-attribute
instance-attribute
¶
List of options to show.
min_values: int | None = None
class-attribute
instance-attribute
¶
Minimum number of items that must be chosen. Discord defaults to 1.
max_values: int | None = None
class-attribute
instance-attribute
¶
Maximum number of items that must be chosen. Discord defaults to 1.
required: bool | None = None
class-attribute
instance-attribute
¶
Whether a selection is required for submission. Discord defaults to the number of options.
type: ComponentType = field(init=False, default=(ComponentType.CHECKBOX_GROUP))
class-attribute
instance-attribute
¶
Component type. Always ComponentType.CHECKBOX_GROUP for this class.
Checkbox
dataclass
¶
Bases: Component, LabelChild
flowchart TD
scurrypy.api.components.modal.Checkbox[Checkbox]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.LabelChild[LabelChild]
scurrypy.bases.components.Component --> scurrypy.api.components.modal.Checkbox
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
scurrypy.bases.components.LabelChild --> scurrypy.api.components.modal.Checkbox
click scurrypy.api.components.modal.Checkbox href "" "scurrypy.api.components.modal.Checkbox"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
click scurrypy.bases.components.LabelChild href "" "scurrypy.bases.components.LabelChild"
Represents a checkbox component.
A Checkbox is for simple yes/no style questions.
custom_id: str | None = None
class-attribute
instance-attribute
¶
ID for the option.
default: bool | None = None
class-attribute
instance-attribute
¶
Whether to show this option as selected by default.
type: ComponentType = field(init=False, default=(ComponentType.CHECKBOX))
class-attribute
instance-attribute
¶
Component type. Always ComponentType.CHECKBOX for this class.
Select Menu¶
select_menu
¶
SelectOption
dataclass
¶
Bases: DataModel
flowchart TD
scurrypy.api.components.select_menu.SelectOption[SelectOption]
scurrypy.core.model.DataModel[DataModel]
scurrypy.core.model.DataModel --> scurrypy.api.components.select_menu.SelectOption
click scurrypy.api.components.select_menu.SelectOption href "" "scurrypy.api.components.select_menu.SelectOption"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
Represents the Select Option component.
label: str | None = None
class-attribute
instance-attribute
¶
User-facing name of the option.
value: str | None = None
class-attribute
instance-attribute
¶
Developer-defined value of the option.
description: str | None = None
class-attribute
instance-attribute
¶
Additional description of the option.
emoji: EmojiModel | None = None
class-attribute
instance-attribute
¶
Partial emoji object.
default: bool | None = None
class-attribute
instance-attribute
¶
Whether this option is selected by default. Discord defaults to False.
StringSelect
dataclass
¶
Bases: Component, ActionRowChild, LabelChild
flowchart TD
scurrypy.api.components.select_menu.StringSelect[StringSelect]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.ActionRowChild[ActionRowChild]
scurrypy.bases.components.LabelChild[LabelChild]
scurrypy.bases.components.Component --> scurrypy.api.components.select_menu.StringSelect
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
scurrypy.bases.components.ActionRowChild --> scurrypy.api.components.select_menu.StringSelect
scurrypy.bases.components.LabelChild --> scurrypy.api.components.select_menu.StringSelect
click scurrypy.api.components.select_menu.StringSelect href "" "scurrypy.api.components.select_menu.StringSelect"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
click scurrypy.bases.components.ActionRowChild href "" "scurrypy.bases.components.ActionRowChild"
click scurrypy.bases.components.LabelChild href "" "scurrypy.bases.components.LabelChild"
Represents the String Select component.
A String Select allows users to select one or more provided options.
custom_id: str | None = None
class-attribute
instance-attribute
¶
ID for the select menu.
options: list[SelectOption] | None = None
class-attribute
instance-attribute
¶
Specified choices in a select menu.
placeholder: str | None = None
class-attribute
instance-attribute
¶
Placeholder text if nothing is selected or default.
min_values: int | None = None
class-attribute
instance-attribute
¶
Minimum number of items that must be chosen. Discord defaults to 1.
max_values: int | None = None
class-attribute
instance-attribute
¶
Maximum number of items that can be chosen. Discord defaults to 1.
required: bool | None = None
class-attribute
instance-attribute
¶
Whether the string select is required to answer in a modal. Discord defaults to True.
disabled: bool | None = None
class-attribute
instance-attribute
¶
Whether select menu is disabled in a message. Discord defaults to False.
type: ComponentType = field(init=False, default=(ComponentType.STRING_SELECT))
class-attribute
instance-attribute
¶
Component type. Always ComponentType.STRING_SELECT for this class.
DefaultValue
dataclass
¶
Bases: DataModel
flowchart TD
scurrypy.api.components.select_menu.DefaultValue[DefaultValue]
scurrypy.core.model.DataModel[DataModel]
scurrypy.core.model.DataModel --> scurrypy.api.components.select_menu.DefaultValue
click scurrypy.api.components.select_menu.DefaultValue href "" "scurrypy.api.components.select_menu.DefaultValue"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
Represents the Default Value for Select components.
SelectMenuMixin
dataclass
¶
Represents common fields for Discord's select menus.
custom_id: str | None = None
class-attribute
instance-attribute
¶
ID for the select menu.
placeholder: str | None = None
class-attribute
instance-attribute
¶
Placeholder text if nothing is selected.
default_values: list[DefaultValue] | None = None
class-attribute
instance-attribute
¶
List of default values for auto-populated select menu components.
Number of default values must be in the range of min_values to max_values.
min_values: int | None = None
class-attribute
instance-attribute
¶
Minimum number of items that must be chosen. Discord defaults to 1.
max_values: int | None = None
class-attribute
instance-attribute
¶
Maximum number of items that can be chosen. Discord defaults to 1.
required: bool | None = None
class-attribute
instance-attribute
¶
Whether the select is required to answer in a modal. Discord defaults to True.
disabled: bool | None = None
class-attribute
instance-attribute
¶
Whether select menu is disabled in a message. Discord defaults to False.
UserSelect
dataclass
¶
Bases: SelectMenuMixin, Component, ActionRowChild, LabelChild
flowchart TD
scurrypy.api.components.select_menu.UserSelect[UserSelect]
scurrypy.api.components.select_menu.SelectMenuMixin[SelectMenuMixin]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.ActionRowChild[ActionRowChild]
scurrypy.bases.components.LabelChild[LabelChild]
scurrypy.api.components.select_menu.SelectMenuMixin --> scurrypy.api.components.select_menu.UserSelect
scurrypy.bases.components.Component --> scurrypy.api.components.select_menu.UserSelect
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
scurrypy.bases.components.ActionRowChild --> scurrypy.api.components.select_menu.UserSelect
scurrypy.bases.components.LabelChild --> scurrypy.api.components.select_menu.UserSelect
click scurrypy.api.components.select_menu.UserSelect href "" "scurrypy.api.components.select_menu.UserSelect"
click scurrypy.api.components.select_menu.SelectMenuMixin href "" "scurrypy.api.components.select_menu.SelectMenuMixin"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
click scurrypy.bases.components.ActionRowChild href "" "scurrypy.bases.components.ActionRowChild"
click scurrypy.bases.components.LabelChild href "" "scurrypy.bases.components.LabelChild"
Represents the User Select component.
User Select allows users to select one or more users.
type: ComponentType = field(init=False, default=(ComponentType.USER_SELECT))
class-attribute
instance-attribute
¶
Component type. Always ComponentType.USER_SELECT for this class.
RoleSelect
dataclass
¶
Bases: SelectMenuMixin, Component, ActionRowChild, LabelChild
flowchart TD
scurrypy.api.components.select_menu.RoleSelect[RoleSelect]
scurrypy.api.components.select_menu.SelectMenuMixin[SelectMenuMixin]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.ActionRowChild[ActionRowChild]
scurrypy.bases.components.LabelChild[LabelChild]
scurrypy.api.components.select_menu.SelectMenuMixin --> scurrypy.api.components.select_menu.RoleSelect
scurrypy.bases.components.Component --> scurrypy.api.components.select_menu.RoleSelect
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
scurrypy.bases.components.ActionRowChild --> scurrypy.api.components.select_menu.RoleSelect
scurrypy.bases.components.LabelChild --> scurrypy.api.components.select_menu.RoleSelect
click scurrypy.api.components.select_menu.RoleSelect href "" "scurrypy.api.components.select_menu.RoleSelect"
click scurrypy.api.components.select_menu.SelectMenuMixin href "" "scurrypy.api.components.select_menu.SelectMenuMixin"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
click scurrypy.bases.components.ActionRowChild href "" "scurrypy.bases.components.ActionRowChild"
click scurrypy.bases.components.LabelChild href "" "scurrypy.bases.components.LabelChild"
Represents the Role Select component.
A Role Select allows users to select one or more roles
type: ComponentType = field(init=False, default=(ComponentType.ROLE_SELECT))
class-attribute
instance-attribute
¶
Component type. Always ComponentType.ROLE_SELECT for this class.
MentionableSelect
dataclass
¶
Bases: SelectMenuMixin, Component, ActionRowChild, LabelChild
flowchart TD
scurrypy.api.components.select_menu.MentionableSelect[MentionableSelect]
scurrypy.api.components.select_menu.SelectMenuMixin[SelectMenuMixin]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.ActionRowChild[ActionRowChild]
scurrypy.bases.components.LabelChild[LabelChild]
scurrypy.api.components.select_menu.SelectMenuMixin --> scurrypy.api.components.select_menu.MentionableSelect
scurrypy.bases.components.Component --> scurrypy.api.components.select_menu.MentionableSelect
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
scurrypy.bases.components.ActionRowChild --> scurrypy.api.components.select_menu.MentionableSelect
scurrypy.bases.components.LabelChild --> scurrypy.api.components.select_menu.MentionableSelect
click scurrypy.api.components.select_menu.MentionableSelect href "" "scurrypy.api.components.select_menu.MentionableSelect"
click scurrypy.api.components.select_menu.SelectMenuMixin href "" "scurrypy.api.components.select_menu.SelectMenuMixin"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
click scurrypy.bases.components.ActionRowChild href "" "scurrypy.bases.components.ActionRowChild"
click scurrypy.bases.components.LabelChild href "" "scurrypy.bases.components.LabelChild"
Represents the Mentionable Select component.
A Mentionable Select allows users to select one or more mentionables.
type: ComponentType = field(init=False, default=(ComponentType.MENTIONABLE_SELECT))
class-attribute
instance-attribute
¶
Component type. Always ComponentType.MENTIONABLE_SELECT for this class.
ChannelSelect
dataclass
¶
Bases: SelectMenuMixin, Component, ActionRowChild, LabelChild
flowchart TD
scurrypy.api.components.select_menu.ChannelSelect[ChannelSelect]
scurrypy.api.components.select_menu.SelectMenuMixin[SelectMenuMixin]
scurrypy.bases.components.Component[Component]
scurrypy.core.model.DataModel[DataModel]
scurrypy.bases.components.ActionRowChild[ActionRowChild]
scurrypy.bases.components.LabelChild[LabelChild]
scurrypy.api.components.select_menu.SelectMenuMixin --> scurrypy.api.components.select_menu.ChannelSelect
scurrypy.bases.components.Component --> scurrypy.api.components.select_menu.ChannelSelect
scurrypy.core.model.DataModel --> scurrypy.bases.components.Component
scurrypy.bases.components.ActionRowChild --> scurrypy.api.components.select_menu.ChannelSelect
scurrypy.bases.components.LabelChild --> scurrypy.api.components.select_menu.ChannelSelect
click scurrypy.api.components.select_menu.ChannelSelect href "" "scurrypy.api.components.select_menu.ChannelSelect"
click scurrypy.api.components.select_menu.SelectMenuMixin href "" "scurrypy.api.components.select_menu.SelectMenuMixin"
click scurrypy.bases.components.Component href "" "scurrypy.bases.components.Component"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
click scurrypy.bases.components.ActionRowChild href "" "scurrypy.bases.components.ActionRowChild"
click scurrypy.bases.components.LabelChild href "" "scurrypy.bases.components.LabelChild"
Represents the Channel Select component.
A Channel Select allows users to select one or more channels.
type: ComponentType = field(init=False, default=(ComponentType.CHANNEL_SELECT))
class-attribute
instance-attribute
¶
Component type. Always ComponentType.CHANNEL_SELECT for this class.