UNPKG

tgsnake

Version:

Telegram MTProto framework for nodejs.

91 lines (90 loc) 3.53 kB
import { TLObject } from '../TL.js'; import { Raw } from '../../platform.node.js'; import type { Snake } from '../../Client/index.js'; import { ChatPermission } from './ChatPermission.js'; import { Restriction } from './Restriction.js'; import { ChatPhoto } from './ChatPhoto.js'; export interface TypeChat { id: bigint; accessHash?: bigint; type: string; title?: string; username?: string; firstname?: string; lastname?: string; photo?: ChatPhoto; bio?: string; hasPrivateForwards?: boolean; joinToSendMessages?: boolean; joinByRequest?: boolean; description?: string; inviteLink?: string; pinnedMessage?: TLObject; permissions?: ChatPermission; slowModeDelay?: number; messageAutoDeleteTime?: number; hasProtectContent?: boolean; stickerSetName?: string; canSetStickerSet?: boolean; linkedChatId?: bigint; location?: TLObject; isVerified?: boolean; isRestricted?: boolean; isCreator?: boolean; isScam?: boolean; isFake?: boolean; isSupport?: boolean; dcId?: number; membersCount?: number; restrictions?: Array<Restriction>; sendAsChat?: Chat; availableReactions?: Array<string>; isLeft?: boolean; isInactive?: boolean; } export declare class Chat extends TLObject { id: bigint; accessHash?: bigint; type: string; title?: string; username?: string; firstname?: string; lastname?: string; photo?: ChatPhoto; bio?: string; hasPrivateForwards?: boolean; joinToSendMessages?: boolean; joinByRequest?: boolean; description?: string; inviteLink?: string; pinnedMessage?: TLObject; permissions?: ChatPermission; slowModeDelay?: number; messageAutoDeleteTime?: number; hasProtectContent?: boolean; stickerSetName?: string; canSetStickerSet?: boolean; linkedChatId?: bigint; location?: TLObject; isVerified?: boolean; isRestricted?: boolean; isCreator?: boolean; isScam?: boolean; isFake?: boolean; isSupport?: boolean; dcId?: number; membersCount?: number; restrictions?: Array<Restriction>; sendAsChat?: Chat; availableReactions?: Array<string>; isLeft?: boolean; isInactive?: boolean; constructor({ id, accessHash, type, title, username, firstname, lastname, photo, bio, hasPrivateForwards, joinToSendMessages, joinByRequest, description, inviteLink, pinnedMessage, permissions, slowModeDelay, messageAutoDeleteTime, hasProtectContent, stickerSetName, canSetStickerSet, linkedChatId, location, isVerified, isRestricted, isCreator, isScam, isFake, isSupport, dcId, membersCount, restrictions, sendAsChat, availableReactions, isLeft, isInactive, }: TypeChat, client: Snake); static parseMessage(client: Snake, message: Raw.Message | Raw.MessageService, users: Array<Raw.TypeUser>, chats: Array<Raw.TypeChat>, chat?: boolean): Chat | undefined; static parseChat(client: Snake, chat?: Raw.ChatEmpty | Raw.Chat | Raw.ChatForbidden): Chat | undefined; static parseChannel(client: Snake, channel?: Raw.Channel | Raw.ChannelForbidden): Chat | undefined; static parseUser(client: Snake, user?: Raw.User | Raw.UserEmpty): Chat | undefined; static parseDialog(client: Snake, peer: Raw.TypePeer, users: Array<Raw.TypeUser>, chats: Array<Raw.TypeChat>): Chat | undefined; static parseRestrictions(client: Snake, restrictions: Array<Raw.TypeRestrictionReason>): Array<Restriction> | undefined; get inputPeer(): Raw.TypeInputPeer; }