peyk.platform_core.contracts.chat_member

Normalized membership-transition contracts.

Classes

IncomingBotMembershipChange([chat_id, ...])

Simple bot-added/bot-removed event.

IncomingChatMemberStatusUpdate([chat_id, ...])

Rich Telegram-style member status transition.

class peyk.platform_core.contracts.chat_member.IncomingChatMemberStatusUpdate(chat_id: int | str | None = None, actor_id: int | str | None = None, target_user_id: int | str | None = None, old_status: str | None = None, new_status: str | None = None, old_is_member: bool | None = None, new_is_member: bool | None = None, date: int | None = None, raw: object = None)[source]

Bases: object

Rich Telegram-style member status transition.

actor_id is optional by design; an adapter must never invent it.

chat_id: int | str | None = None
actor_id: int | str | None = None
target_user_id: int | str | None = None
old_status: str | None = None
new_status: str | None = None
old_is_member: bool | None = None
new_is_member: bool | None = None
date: int | None = None
raw: object = None
class peyk.platform_core.contracts.chat_member.IncomingBotMembershipChange(chat_id: int | str | None = None, added: bool = False, actor_id: int | str | None = None, raw: object = None)[source]

Bases: object

Simple bot-added/bot-removed event.

Rubika provides this explicitly through EventData; Telegram/Bale can derive it from new/left chat-member message fields when the bot itself is the member mentioned there. actor_id remains optional.

chat_id: int | str | None = None
added: bool = False
actor_id: int | str | None = None
raw: object = None