UNPKG

tgsnake

Version:

Telegram MTProto framework for nodejs.

55 lines (54 loc) 2.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Telegram = void 0; const TL_js_1 = require("../TL/TL.js"); const index_js_1 = require("./Messages/index.js"); const index_js_2 = require("./Chats/index.js"); class Telegram extends TL_js_1.TLObject { constructor(client) { super(client); } download(params) { return (0, index_js_1.download)(this.client, params); } deleteMessage(chatId, message) { return (0, index_js_1.deleteMessages)(this.client, chatId, [message]); } deleteMessages(chatId, messages) { return (0, index_js_1.deleteMessages)(this.client, chatId, messages); } invoke(query, retries, timeout, sleepTreshold) { return this.client._client.invoke(query, retries, timeout, sleepTreshold); } getMessages(chatId, msgIds, replyToMsgIds, replies) { return (0, index_js_1.getMessages)(this.client, chatId, msgIds, replyToMsgIds, replies); } sendMessage(chatId, text, more) { return (0, index_js_1.sendMessage)(this.client, chatId, text, more); } sendDocument(chatId, document, more) { return (0, index_js_1.sendDocument)(this.client, chatId, document, more); } sendVideo(chatId, video, more) { return (0, index_js_1.sendVideo)(this.client, chatId, video, more); } sendVideoNote(chatId, video, more) { return (0, index_js_1.sendVideoNote)(this.client, chatId, video, more); } sendAnimation(chatId, video, more) { return (0, index_js_1.sendAnimation)(this.client, chatId, video, more); } sendPhoto(chatId, photo, more) { return (0, index_js_1.sendPhoto)(this.client, chatId, photo, more); } sendSticker(chatId, sticker, more) { return (0, index_js_1.sendSticker)(this.client, chatId, sticker, more); } sendAudio(chatId, audio, more) { return (0, index_js_1.sendAudio)(this.client, chatId, audio, more); } getParticipants(chatId, more) { return (0, index_js_2.getParticipants)(this.client, chatId, more); } } exports.Telegram = Telegram;