peyk.platforms.telegram.types.chat_member_banned

Classes

ChatMemberBanned([status, user, until_date])

Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.

class peyk.platforms.telegram.types.chat_member_banned.ChatMemberBanned(status: str = 'kicked', user: User | None = None, until_date: int | None = None)[source]

Bases: object

Represents a chat member that was banned in the chat and can’t return to the chat or view chat messages.

Variables:
  • status (str) – The member’s status in the chat, always ‘kicked’

  • user (peyk.platforms.telegram.types.user.User | None) – Information about the user

  • until_date (int | None) – Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever.

status: str = 'kicked'
user: User | None = None
until_date: int | None = None
classmethod from_dict(data: dict | None) ChatMemberBanned | None[source]

Parse a Telegram API mapping into this type.

Parameters:

data – Raw Telegram API mapping, or None.

Returns:

Parsed type instance, or None when data is None.