discord-interactions.py

create_section

Function

Section (type 9): 1 to 3 texts with an accessory, button or thumbnail.

from discord_interactions import create_section

Signature

def create_section(    *texts: Any,    accessory: Any,    component_id: int | None = None,) -> Dict[str, Any]

Parameters

NameTypeDefaultDescription
*textsAny
accessoryAnyrequiredButton or thumbnail shown on the right.
component_idint | NoneNone

Returns

Dict[str, Any]

Type a name: create_button, ModalBuilder, cooldown.