tgsnake
Version:
Telegram MTProto framework for nodejs.
23 lines (22 loc) • 2.58 kB
TypeScript
import { TLObject } from '../TL/TL.js';
import { Raw, type Readable, type Files, Buffer } from '../platform.node.js';
import type { Snake } from '../Client/index.js';
import { type sendMessageParams, type sendDocumentParams, type sendVideoParams, type sendVideoNoteParams, type sendAnimationParams, type sendStickerParams, type sendAudioParams, type DownloadParams, type sendPhotoParams } from './Messages/index.js';
import { type getParticipantsParams } from './Chats/index.js';
export declare class Telegram extends TLObject {
constructor(client: Snake);
download(params: DownloadParams): Promise<Files.File>;
deleteMessage(chatId: string | bigint, message: number): Promise<true>;
deleteMessages(chatId: string | bigint, messages: Array<number>): Promise<true>;
invoke<T extends Raw.TypesTLRequest>(query: T, retries?: number, timeout?: number, sleepTreshold?: number): Promise<T['__response__']>;
getMessages(chatId: bigint | string, msgIds?: Array<number>, replyToMsgIds?: Array<number>, replies?: number): Promise<import("../TL/Messages/Message.js").Message[]>;
sendMessage(chatId: bigint | string, text: string, more?: sendMessageParams): Promise<import("../TL/Messages/Message.js").Message>;
sendDocument(chatId: bigint | string, document: string | Buffer | Readable | Files.File, more?: sendDocumentParams): Promise<import("../TL/Messages/Message.js").Message>;
sendVideo(chatId: bigint | string, video: string | Buffer | Readable | Files.File, more?: sendVideoParams): Promise<import("../TL/Messages/Message.js").Message>;
sendVideoNote(chatId: bigint | string, video: string | Buffer | Readable | Files.File, more?: sendVideoNoteParams): Promise<import("../TL/Messages/Message.js").Message>;
sendAnimation(chatId: bigint | string, video: string | Buffer | Readable | Files.File, more?: sendAnimationParams): Promise<import("../TL/Messages/Message.js").Message>;
sendPhoto(chatId: bigint | string, photo: string | Buffer | Readable | Files.File, more?: sendPhotoParams): Promise<import("../TL/Messages/Message.js").Message>;
sendSticker(chatId: bigint | string, sticker: string | Buffer | Readable | Files.File, more?: sendStickerParams): Promise<import("../TL/Messages/Message.js").Message>;
sendAudio(chatId: bigint | string, audio: string | Buffer | Readable | Files.File, more?: sendAudioParams): Promise<import("../TL/Messages/Message.js").Message>;
getParticipants(chatId: bigint | string, more?: getParticipantsParams): Promise<Raw.TypeChatParticipants | Raw.channels.TypeChannelParticipants | undefined>;
}