import { GetEntity } from './Users/GetEntity' ; import { sendMessage , sendMessageMoreParams } from './Messages/sendMessage' ; import { DeleteMessages } from './Messages/DeleteMessages' ; import { EditMessage , editMessageMoreParams } from './Messages/EditMessage' ; import { ForwardMessages , forwardMessageMoreParams } from './Messages/ForwardMessages' ; import { GetMessages } from './Messages/GetMessages' ; import { GetMessagesViews } from './Messages/GetMessagesViews' ; import { GetUserPhotos , getUserPhotosMoreParams } from './Users/GetUserPhotos' ; import { ReadHistory , readHistoryMoreParams } from './Messages/ReadHistory' ; import { ReadMentions } from './Messages/ReadMentions' ; import { ReadMessageContents } from './Messages/ReadMessageContents' ; import { UnpinAllMessages } from './Messages/UnpinAllMessages' ; import { PinMessage , pinMessageMoreParams } from './Messages/PinMessage' ; import { DeleteHistory , deleteHistoryMoreParams } from './Messages/DeleteHistory' ; import { DeleteUserHistory } from './Messages/DeleteUserHistory' ; import { EditAdmin , editAdminMoreParams } from './Chats/EditAdmin' ; import { EditBanned , editBannedMoreParams } from './Chats/EditBanned' ; import { EditPhoto } from './Media/EditPhoto' ; import { EditTitle } from './Chats/EditTitle' ; import { exportMessageLinkMoreParams , ExportMessageLink } from './Messages/ExportMessageLink' ; import { GetAdminedPublicChannels } from './Chats/GetAdminedPublicChannels' ; import { GetAdminLog , getAdminLogMoreParams } from './Chats/GetAdminLog' ; import { GetChannels } from './Chats/GetChannels' ; import { GetFullChat } from './Chats/GetFullChat' ; import { GetGroupsForDiscussion } from './Chats/GetGroupsForDiscussion' ; import { GetInactiveChannels } from './Chats/GetInactiveChannels' ; import { GetLeftChannels } from './Chats/GetLeftChannels' ; import { SendMedia , sendMediaMoreParams } from './Media/SendMedia' ; import { SendPhoto } from './Media/SendPhoto' ; import { SendDocument } from './Media/SendDocument' ; import { SendSticker } from './Media/SendSticker' ; import { Snake } from '../client' ; import { Api , TelegramClient } from 'telegram' ; import { Media } from '../Utils/Media' ; export class Telegram { constructor ( public SnakeClient ) { } async getEntity ( chatId ) { return await GetEntity ( this . SnakeClient , chatId ) ; } async getMe ( ) { return await this . getEntity ( 'me' ) ; } async sendMessage ( chatId , text , more ? ) { return await sendMessage ( this . SnakeClient , chatId , text , more ) ; } async deleteMessage ( chatId , messageId ) { return await DeleteMessages ( this . SnakeClient , chatId , messageId ) ; } async editMessage ( chatId , messageId , text , more ? ) { return await EditMessage ( this . SnakeClient , chatId , messageId , text , more ) ; } async forwardMessages ( chatId , fromChatId , messageId , more ? ) { return await ForwardMessages ( this . SnakeClient , chatId , fromChatId , messageId , more ) ; } async getMessages ( chatId , messageId ) { return await GetMessages ( this . SnakeClient , chatId , messageId ) ; } async getMessagesViews ( chatId , messageId , increment = false ) { return await GetMessagesViews ( this . SnakeClient , chatId , messageId , increment ) ; } async getUserPhotos ( chatId , more ? ) { return await GetUserPhotos ( this . SnakeClient , chatId , more ) ; } async readHistory ( chatId , more ? ) { return await ReadHistory ( this . SnakeClient , chatId , more ) ; } async readMentions ( chatId ) { return await ReadMentions ( this . SnakeClient , chatId ) ; } async readMessageContents ( messageId ) { return await ReadMessageContents ( this . SnakeClient , messageId ) ; } async unpinAllMessages ( chatId ) { return await UnpinAllMessages ( this . SnakeClient , chatId ) ; } async pinMessages ( chatId , messageId , more ? ) { return await PinMessage ( this . SnakeClient , chatId , messageId , more ) ; } async unpinMessage ( chatId , messageId ) { return await PinMessage ( this . SnakeClient , chatId , messageId , { unpin : true } ) ; } async deleteHistory ( chatId , more ? ) { return await DeleteHistory ( this . SnakeClient , chatId , more ) ; } async deleteUserHistory ( chatId , userId ) { return await DeleteUserHistory ( this . SnakeClient , chatId , userId ) ; } async editAdmin ( chatId , userId , more ? ) { return await EditAdmin ( this . SnakeClient , chatId , userId , more ) ; } async editBanned ( chatId , userId , more ? ) { return await EditBanned ( this . SnakeClient , chatId , userId , more ) ; } async editPhoto ( chatId , photo ) { return await EditPhoto ( this . SnakeClient , chatId , photo ) ; } async editTitle ( chatId , title ) { return await EditTitle ( this . SnakeClient , chatId , title ) ; } async exportMessageLink ( chatId , messageId , more ? ) { return await ExportMessageLink ( this . SnakeClient , chatId , messageId , more ) ; } async getAdminedPublicChannels ( byLocation = true , checkLimit = true ) { return await GetAdminedPublicChannels ( this . SnakeClient , byLocation , checkLimit ) ; } async getAdminLog ( chatId , more ? ) { return GetAdminLog ( this . SnakeClient , chatId , more ) ; } async getChannels ( chatId ) { return await GetChannels ( this . SnakeClient , chatId ) ; } async getFullChat ( chatId ) { return await GetFullChat ( this . SnakeClient , chatId ) ; } async getGroupsForDiscussion ( ) { return await GetGroupsForDiscussion ( this . SnakeClient ) ; } async getInactiveChannels ( ) { return await GetInactiveChannels ( this . SnakeClient ) ; } async getLeftChannels ( offset = 0 ) { return await GetLeftChannels ( this . SnakeClient , offset ) ; } async sendMedia ( chatId , media , more ? ) { return await SendMedia ( this . SnakeClient , chatId , media , more ) ; } async sendPhoto ( chatId , fileId , more ? ) { return await SendPhoto ( this . SnakeClient , chatId , fileId , more ) ; } async sendDocument ( chatId , fileId , more ? ) { return await SendDocument ( this . SnakeClient , chatId , fileId , more ) ; } async sendSticker ( chatId , fileId ) { return SendSticker ( this . SnakeClient , chatId , fileId ) ; } }