Class ChatMemberAdministratorContext

Hierarchy

Constructors

Properties

_client: Evogram
_source: IChatMemberAdministrator & {
    chat_id: string | number;
}

Accessors

  • get permissions(): {
        can_be_edited: boolean;
        can_change_info: boolean;
        can_delete_messages: boolean;
        can_edit_messages: undefined | boolean;
        can_invite_users: boolean;
        can_manage_chat: boolean;
        can_manage_topics: undefined | boolean;
        can_manage_video_chats: boolean;
        can_pin_messages: undefined | boolean;
        can_post_messages: undefined | boolean;
        can_promote_members: boolean;
        can_restrict_members: boolean;
    }
  • Returns the chat member permissions.

    Returns {
        can_be_edited: boolean;
        can_change_info: boolean;
        can_delete_messages: boolean;
        can_edit_messages: undefined | boolean;
        can_invite_users: boolean;
        can_manage_chat: boolean;
        can_manage_topics: undefined | boolean;
        can_manage_video_chats: boolean;
        can_pin_messages: undefined | boolean;
        can_post_messages: undefined | boolean;
        can_promote_members: boolean;
        can_restrict_members: boolean;
    }

    An object containing the member permissions.

    • can_be_edited: boolean
    • can_change_info: boolean
    • can_delete_messages: boolean
    • can_edit_messages: undefined | boolean
    • can_invite_users: boolean
    • can_manage_chat: boolean
    • can_manage_topics: undefined | boolean
    • can_manage_video_chats: boolean
    • can_pin_messages: undefined | boolean
    • can_post_messages: undefined | boolean
    • can_promote_members: boolean
    • can_restrict_members: boolean

Methods

  • Converts the source object to a context object of a given type.

    Example

    client.updates.on("message", message => {
    const user = message.user.toContext<CustomUserContext>();
    // Now user works correctly with your context
    })

    Type Parameters

    • TContext extends object

      Generic type parameter for the context object.

    Returns TContext

    The context object.

Generated using TypeDoc