Skip to content

Components Contexts


ctx

ComponentContext dataclass

Bases: InteractionContext


              flowchart TD
              scurrypy.ext.components.ctx.ComponentContext[ComponentContext]
              scurrypy.ext.interactions.ctx.InteractionContext[InteractionContext]
              scurrypy.resources.interaction.Interaction[Interaction]
              scurrypy.resources.base_resource.BaseResource[BaseResource]

                              scurrypy.ext.interactions.ctx.InteractionContext --> scurrypy.ext.components.ctx.ComponentContext
                                scurrypy.resources.interaction.Interaction --> scurrypy.ext.interactions.ctx.InteractionContext
                                scurrypy.resources.base_resource.BaseResource --> scurrypy.resources.interaction.Interaction
                




              click scurrypy.ext.components.ctx.ComponentContext href "" "scurrypy.ext.components.ctx.ComponentContext"
              click scurrypy.ext.interactions.ctx.InteractionContext href "" "scurrypy.ext.interactions.ctx.InteractionContext"
              click scurrypy.resources.interaction.Interaction href "" "scurrypy.resources.interaction.Interaction"
              click scurrypy.resources.base_resource.BaseResource href "" "scurrypy.resources.base_resource.BaseResource"
            

MessageComponentContext dataclass

Bases: ComponentContext


              flowchart TD
              scurrypy.ext.components.ctx.MessageComponentContext[MessageComponentContext]
              scurrypy.ext.components.ctx.ComponentContext[ComponentContext]
              scurrypy.ext.interactions.ctx.InteractionContext[InteractionContext]
              scurrypy.resources.interaction.Interaction[Interaction]
              scurrypy.resources.base_resource.BaseResource[BaseResource]

                              scurrypy.ext.components.ctx.ComponentContext --> scurrypy.ext.components.ctx.MessageComponentContext
                                scurrypy.ext.interactions.ctx.InteractionContext --> scurrypy.ext.components.ctx.ComponentContext
                                scurrypy.resources.interaction.Interaction --> scurrypy.ext.interactions.ctx.InteractionContext
                                scurrypy.resources.base_resource.BaseResource --> scurrypy.resources.interaction.Interaction
                





              click scurrypy.ext.components.ctx.MessageComponentContext href "" "scurrypy.ext.components.ctx.MessageComponentContext"
              click scurrypy.ext.components.ctx.ComponentContext href "" "scurrypy.ext.components.ctx.ComponentContext"
              click scurrypy.ext.interactions.ctx.InteractionContext href "" "scurrypy.ext.interactions.ctx.InteractionContext"
              click scurrypy.resources.interaction.Interaction href "" "scurrypy.resources.interaction.Interaction"
              click scurrypy.resources.base_resource.BaseResource href "" "scurrypy.resources.base_resource.BaseResource"
            

event: JsonQuery instance-attribute

ComponentModalContext dataclass

Bases: ComponentContext


              flowchart TD
              scurrypy.ext.components.ctx.ComponentModalContext[ComponentModalContext]
              scurrypy.ext.components.ctx.ComponentContext[ComponentContext]
              scurrypy.ext.interactions.ctx.InteractionContext[InteractionContext]
              scurrypy.resources.interaction.Interaction[Interaction]
              scurrypy.resources.base_resource.BaseResource[BaseResource]

                              scurrypy.ext.components.ctx.ComponentContext --> scurrypy.ext.components.ctx.ComponentModalContext
                                scurrypy.ext.interactions.ctx.InteractionContext --> scurrypy.ext.components.ctx.ComponentContext
                                scurrypy.resources.interaction.Interaction --> scurrypy.ext.interactions.ctx.InteractionContext
                                scurrypy.resources.base_resource.BaseResource --> scurrypy.resources.interaction.Interaction
                





              click scurrypy.ext.components.ctx.ComponentModalContext href "" "scurrypy.ext.components.ctx.ComponentModalContext"
              click scurrypy.ext.components.ctx.ComponentContext href "" "scurrypy.ext.components.ctx.ComponentContext"
              click scurrypy.ext.interactions.ctx.InteractionContext href "" "scurrypy.ext.interactions.ctx.InteractionContext"
              click scurrypy.resources.interaction.Interaction href "" "scurrypy.resources.interaction.Interaction"
              click scurrypy.resources.base_resource.BaseResource href "" "scurrypy.resources.base_resource.BaseResource"
            

event: JsonQuery instance-attribute

get_modal_value

Get a modal interaction value by its custom ID

Parameters:

  • custom_id (str) –

    custom ID of field to fetch

Raises:

Returns:

  • str | list[str] | bool | None –

    component values if select component or value if input or bool if checkbox or None if the component has no submitted value