Channel
Table of Contents
Section titled “Table of Contents”syncopate.models.channel
Section titled “syncopate.models.channel”Channel model with action methods.
Channel Objects
Section titled “Channel Objects”@dataclass(slots=True)class Channel()A Syncopate channel with methods for sending messages and managing members.
async def send(content: str, *, type: str = "text", parent_id: str | None = None, idempotency_key: str | None = None) -> MessageSend a message to this channel.
fetch_messages
Section titled “fetch_messages”async def fetch_messages(*, limit: int = 50, after_sequence: int | None = None, before_sequence: int | None = None) -> list[Message]Fetch messages from this channel.
fetch_members
Section titled “fetch_members”async def fetch_members() -> list[dict[str, object]]Fetch members of this channel.
fetch_presence
Section titled “fetch_presence”async def fetch_presence() -> list[str]Fetch online user IDs in this channel.
trigger_typing
Section titled “trigger_typing”async def trigger_typing() -> NoneSend a typing indicator to this channel.
from_data
Section titled “from_data”@classmethoddef from_data(cls, data: dict[str, object]) -> ChannelConstruct from an API response payload.