/**
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
* Copyright (C) 2023-2026 Roj
*
* This file is part of MTKruto.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
import { Api } from "../2_tl.js";
import { type ChatAdministratorRights } from "./0_chat_administrator_rights.js";
import { type ChatMemberRights } from "./0_chat_member_rights.js";
import type { ChatP, PeerGetter } from "./1_chat_p.js";
/** @unlisted */
export type ChatMemberStatus = "creator" | "administrator" | "member" | "restricted" | "left" | "banned";
/** @unlisted */
export interface _ChatMemberBase {
status: ChatMemberStatus;
member: ChatP;
}
/**
* A chat member which is the creator of the chat.
* @unlisted
*/
export interface ChatMemberCreator extends _ChatMemberBase {
/** The status of the chat member. */
status: "creator";
/** Whether the chat member is an anonymous admin. */
isAnonymous: boolean;
/** The custom title of the chat member. */
title?: string;
}
/**
* A chat member which is an administrator.
* @unlisted
*/
export interface ChatMemberAdministrator extends _ChatMemberBase {
/** The status of the chat member. */
status: "administrator";
/** The rights of the chat administrator. */
rights: ChatAdministratorRights;
/** The custom title of the chat member. */
title?: string;
}
/**
* An unpromoted chat member.
* @unlisted
*/
export interface ChatMemberMember extends _ChatMemberBase {
/** The status of the chat member. */
status: "member";
/** A point in time when the membership expires. */
until?: number;
/** The tag of the member. */
tag?: string;
}
/**
* A restricted chat member.
* @unlisted
*/
export interface ChatMemberRestricted extends _ChatMemberBase {
/** The status of the chat member. */
status: "restricted";
/** Whether the restricted user is currently a member of the chat. */
isMember: boolean;
/** The rights of the restricted chat member. */
rights: ChatMemberRights;
/** A point in time when the restriction expires. */
until?: number;
/** The tag of the member. */
tag?: string;
}
/**
* A chat member which has left.
* @unlisted
*/
export interface ChatMemberLeft extends _ChatMemberBase {
/** The status of the chat member. */
status: "left";
}
/**
* A banned chat member.
* @unlisted
*/
export interface ChatMemberBanned extends _ChatMemberBase {
/** The status of the chat member. */
status: "banned";
/** A point in time when the restriction expires. */
until?: number;
}
/** A chat member. */
export type ChatMember = ChatMemberCreator | ChatMemberAdministrator | ChatMemberMember | ChatMemberRestricted | ChatMemberLeft | ChatMemberBanned;
export declare function constructChatMember(member: ChatP, participant: Api.ChannelParticipant | Api.ChatParticipant | (Omit & {
peer: ReturnType;
}), getPeer: PeerGetter): ChatMember;
//# sourceMappingURL=2_chat_member.d.ts.map