bottender
Version:
A framework for building conversational user interfaces.
64 lines • 5.44 kB
TypeScript
import { TelegramClient } from 'messaging-api-telegram';
import Context from '../context/Context';
import TelegramEvent from './TelegramEvent';
import * as Type from './TelegramTypes';
declare class TelegramContext extends Context<TelegramClient, TelegramEvent> {
get platform(): 'telegram';
sendText(text: string, options?: Type.SendMessageOption): Promise<Type.Message | null>;
sendMessage(text: string, options?: Type.SendMessageOption): Promise<Type.Message | null>;
_getChatId(): number | null;
answerShippingQuery(ok: boolean, options?: Type.AnswerShippingQueryOption): Promise<boolean | null>;
answerPreCheckoutQuery(ok: boolean, options?: Type.AnswerPreCheckoutQueryOption): Promise<boolean | null>;
answerInlineQuery(results: Type.InlineQueryResult[], options?: Type.AnswerInlineQueryOption): Promise<boolean | null>;
answerCallbackQuery(options: Type.AnswerCallbackQueryOption): Promise<boolean | null>;
getUserProfilePhotos(options?: Type.GetUserProfilePhotosOption): Promise<Type.UserProfilePhotos | null>;
getChat(): Promise<Type.Chat | null>;
getChatAdministrators(): Promise<Type.ChatMember[] | null>;
getChatMembersCount(): Promise<number | null>;
getChatMember(userId: number): Promise<Type.ChatMember | null>;
getGameHighScores(options?: Type.GetGameHighScoresOption): Promise<Type.GameHighScore[] | null>;
editMessageText(messageId: number, text: string, options?: Type.EditMessageTextOption): Promise<Type.Message | boolean | null>;
editMessageCaption(messageId: number, caption: string, options?: Type.EditMessageCaptionOption): Promise<Type.Message | boolean | null>;
editMessageMedia(messageId: number, media: Type.InputMedia, options?: Type.EditMessageMediaOption): Promise<Type.Message | boolean | null>;
editMessageReplyMarkup(messageId: number, replyMarkup: Type.InlineKeyboardMarkup, options?: Type.EditMessageReplyMarkupOption): Promise<Type.Message | boolean | null>;
deleteMessage(messageId: number): Promise<boolean | null>;
editMessageLiveLocation(messageId: number, location: Type.Location, options?: Type.EditMessageLiveLocationOption): Promise<Type.Message | boolean | null>;
stopMessageLiveLocation(messageId: number, options?: Type.StopMessageLiveLocationOption): Promise<Type.Message | boolean | null>;
forwardMessageFrom(fromChatId: string, messageId: number, options?: Type.ForwardMessageOption): Promise<Type.Message | null>;
forwardMessageTo(toChatId: string, messageId: number, options?: Type.ForwardMessageOption): Promise<Type.Message | null>;
sendPhoto(photo: string, options?: Type.SendPhotoOption): Promise<Type.Message | null>;
sendAudio(audio: string, options?: Type.SendAudioOption): Promise<Type.Message | null>;
sendDocument(document: string, options?: Type.SendDocumentOption): Promise<Type.Message | null>;
sendSticker(sticker: string, options?: Type.SendStickerOption): Promise<Type.Message | null>;
sendVideo(video: string, options?: Type.SendVideoOption): Promise<Type.Message | null>;
sendAnimation(animation: string, options?: Type.SendAnimationOption): Promise<Type.Message | null>;
sendVoice(voice: string, options?: Type.SendVoiceOption): Promise<Type.Message | null>;
sendVideoNote(videoNote: string, options?: Type.SendVideoNoteOption): Promise<Type.Message | null>;
sendMediaGroup(media: (Type.InputMediaPhoto | Type.InputMediaVideo)[], options?: Type.SendMediaGroupOption): Promise<Type.Message[] | null>;
sendLocation({ latitude, longitude }: {
latitude: number;
longitude: number;
}, options?: Type.SendLocationOption): Promise<Type.Message | null>;
sendVenue(venue: Type.Venue, options?: Type.SendVenueOption): Promise<Type.Message | null>;
sendContact(requiredOptions: Type.SendContactRequiredOption, options?: Type.SendContactOption): Promise<Type.Message | null>;
sendPoll(question: string, options: string[], otherOptions?: Type.SendPollOption): Promise<Type.Message | null>;
sendChatAction(action: Type.ChatAction): Promise<boolean | null>;
kickChatMember(userId: number, options?: Type.KickChatMemberOption): Promise<boolean | null>;
unbanChatMember(userId: number): Promise<boolean | null>;
restrictChatMember(userId: number, permissions: Type.ChatPermissions, options?: Type.RestrictChatMemberOption): Promise<boolean | null>;
promoteChatMember(userId: number, options?: Type.PromoteChatMemberOption): Promise<boolean | null>;
exportChatInviteLink(): Promise<string | null>;
deleteChatPhoto(): Promise<boolean | null>;
setChatTitle(title: string): Promise<boolean | null>;
setChatDescription(description: string): Promise<boolean | null>;
setChatStickerSet(stickerSetName: string): Promise<boolean | null>;
deleteChatStickerSet(): Promise<boolean | null>;
pinChatMessage(messageId: number, options?: Type.PinChatMessageOption): Promise<boolean | null>;
unpinChatMessage(): Promise<boolean | null>;
leaveChat(): Promise<boolean | null>;
sendInvoice(product: Type.Product, options?: Type.SendInvoiceOption): Promise<Type.Message | null>;
sendGame(gameShortName: string, options?: Type.SendGameOption): Promise<Type.Message | null>;
setGameScore(userId: number, score: number, options?: Type.SetGameScoreOption): Promise<Type.Message | boolean | null>;
}
export default TelegramContext;
//# sourceMappingURL=TelegramContext.d.ts.map