discord-interactions.py

update_component_one

Coroutinemust be awaited

Like update_component, but only when exactly one component matches.

from discord_interactions import update_component_one

Signature

async def update_component_one(    message: Any,    selector: str | Callable[[Dict[str, Any]], bool],    updates: Dict[str, Any],) -> bool

Parameters

NameTypeDefaultDescription
messageAnyrequired
selectorstr | Callable[[Dict[str, Any]], bool]required
updatesDict[str, Any]required

Returns

bool

Type a name: create_button, ModalBuilder, cooldown.