Skip to content

Channel

Channel model with action methods.

@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) -> Message

Send a message to this channel.

async def fetch_messages(*,
limit: int = 50,
after_sequence: int | None = None,
before_sequence: int | None = None) -> list[Message]

Fetch messages from this channel.

async def fetch_members() -> list[dict[str, object]]

Fetch members of this channel.

async def fetch_presence() -> list[str]

Fetch online user IDs in this channel.

async def trigger_typing() -> None

Send a typing indicator to this channel.

@classmethod
def from_data(cls, data: dict[str, object]) -> Channel

Construct from an API response payload.