typescript-telegram-bot-api
Advanced tools
Comparing version 0.1.18 to 0.1.19
@@ -161,3 +161,3 @@ "use strict"; | ||
* ## forwardMessages | ||
* Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of MessageId of the sent messages is returned. | ||
* Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of MessageId of the sent messages is returned. | ||
* @see https://core.telegram.org/bots/api#forwardmessages | ||
@@ -173,3 +173,3 @@ */ | ||
* ## copyMessage | ||
* Use this method to copy messages of any kind. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success. | ||
* Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success. | ||
* @see https://core.telegram.org/bots/api#copymessage | ||
@@ -280,2 +280,15 @@ */ | ||
/** | ||
* ## sendPaidMedia | ||
* Use this method to send paid media to channel chats. On success, the sent Message is returned. | ||
* @see https://core.telegram.org/bots/api#sendpaidmedia | ||
*/ | ||
async sendPaidMedia(options) { | ||
return await this.callApi('sendPaidMedia', { | ||
...options, | ||
media: JSON.stringify(options.media), | ||
caption_entities: JSON.stringify(options.caption_entities), | ||
reply_markup: JSON.stringify(options.reply_markup), | ||
}); | ||
} | ||
/** | ||
* ## sendMediaGroup | ||
@@ -282,0 +295,0 @@ * Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned. |
@@ -34,2 +34,3 @@ import { Message, BusinessLocation, BusinessIntro, ChatPermissions, ChatPhoto, Birthdate, Chat, ReactionType, ChatLocation, BusinessOpeningHours } from './'; | ||
permissions?: ChatPermissions; | ||
can_send_paid_media?: boolean; | ||
slow_mode_delay?: number; | ||
@@ -36,0 +37,0 @@ unrestrict_boost_count?: number; |
@@ -1,2 +0,2 @@ | ||
import { Animation, Sticker, Location, Venue, Chat, LinkPreviewOptions, Audio, Document, PhotoSize, Game, Poll, Story, Giveaway, GiveawayWinners, MessageOrigin, Video, VideoNote, Voice, Contact, Dice, Invoice } from './'; | ||
import { Animation, Sticker, Location, Venue, Chat, LinkPreviewOptions, Audio, Document, PhotoSize, Game, Poll, Story, Giveaway, GiveawayWinners, MessageOrigin, Video, VideoNote, Voice, Contact, Dice, Invoice, PaidMediaInfo } from './'; | ||
export type ExternalReplyInfo = { | ||
@@ -10,2 +10,3 @@ origin: MessageOrigin; | ||
document?: Document; | ||
paid_media?: PaidMediaInfo; | ||
photo?: PhotoSize[]; | ||
@@ -12,0 +13,0 @@ sticker?: Sticker; |
@@ -119,2 +119,5 @@ export * from './Animation'; | ||
export * from './InputMessageContent'; | ||
export * from './InputPaidMedia'; | ||
export * from './InputPaidMediaPhoto'; | ||
export * from './InputPaidMediaVideo'; | ||
export * from './InputPollOption'; | ||
@@ -151,2 +154,7 @@ export * from './InputSticker'; | ||
export * from './OrderInfo'; | ||
export * from './PaidMedia'; | ||
export * from './PaidMediaInfo'; | ||
export * from './PaidMediaPhoto'; | ||
export * from './PaidMediaPreview'; | ||
export * from './PaidMediaVideo'; | ||
export * from './PassportData'; | ||
@@ -183,2 +191,4 @@ export * from './PassportElementError'; | ||
export * from './ShippingQuery'; | ||
export * from './StarTransaction'; | ||
export * from './StarTransactions'; | ||
export * from './Sticker'; | ||
@@ -190,2 +200,8 @@ export * from './StickerSet'; | ||
export * from './TextQuote'; | ||
export * from './PaidMedia'; | ||
export * from './PaidMediaInfo'; | ||
export * from './PaidMediaPhoto'; | ||
export * from './PaidMediaPreview'; | ||
export * from './PaidMediaVideo'; | ||
export * from './TransactionPartnerUser'; | ||
export * from './Update'; | ||
@@ -192,0 +208,0 @@ export * from './User'; |
@@ -135,2 +135,5 @@ "use strict"; | ||
__exportStar(require("./InputMessageContent"), exports); | ||
__exportStar(require("./InputPaidMedia"), exports); | ||
__exportStar(require("./InputPaidMediaPhoto"), exports); | ||
__exportStar(require("./InputPaidMediaVideo"), exports); | ||
__exportStar(require("./InputPollOption"), exports); | ||
@@ -167,2 +170,7 @@ __exportStar(require("./InputSticker"), exports); | ||
__exportStar(require("./OrderInfo"), exports); | ||
__exportStar(require("./PaidMedia"), exports); | ||
__exportStar(require("./PaidMediaInfo"), exports); | ||
__exportStar(require("./PaidMediaPhoto"), exports); | ||
__exportStar(require("./PaidMediaPreview"), exports); | ||
__exportStar(require("./PaidMediaVideo"), exports); | ||
__exportStar(require("./PassportData"), exports); | ||
@@ -199,2 +207,4 @@ __exportStar(require("./PassportElementError"), exports); | ||
__exportStar(require("./ShippingQuery"), exports); | ||
__exportStar(require("./StarTransaction"), exports); | ||
__exportStar(require("./StarTransactions"), exports); | ||
__exportStar(require("./Sticker"), exports); | ||
@@ -206,2 +216,8 @@ __exportStar(require("./StickerSet"), exports); | ||
__exportStar(require("./TextQuote"), exports); | ||
__exportStar(require("./PaidMedia"), exports); | ||
__exportStar(require("./PaidMediaInfo"), exports); | ||
__exportStar(require("./PaidMediaPhoto"), exports); | ||
__exportStar(require("./PaidMediaPreview"), exports); | ||
__exportStar(require("./PaidMediaVideo"), exports); | ||
__exportStar(require("./TransactionPartnerUser"), exports); | ||
__exportStar(require("./Update"), exports); | ||
@@ -208,0 +224,0 @@ __exportStar(require("./User"), exports); |
@@ -1,4 +0,2 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { ReadStream } from 'fs'; | ||
export type InputFile = ReadStream | Buffer; |
@@ -1,2 +0,2 @@ | ||
import { ExternalReplyInfo, Sticker, Venue, Location, Animation, Document, MaybeInaccessibleMessage, ChatBackground, GiveawayCompleted, MessageEntity, LinkPreviewOptions, Poll, InlineKeyboardMarkup, User, PassportData, Game, PhotoSize, Audio, Chat, TextQuote, Story, WriteAccessAllowed, ProximityAlertTriggered, Giveaway, GiveawayWinners, WebAppData, Voice, VideoNote, VideoChatStarted, VideoChatScheduled, VideoChatEnded, VideoChatParticipantsInvited, SuccessfulPayment, Video, UsersShared, MessageOrigin, MessageAutoDeleteTimerChanged, Invoice, GiveawayCreated, GeneralForumTopicUnhidden, GeneralForumTopicHidden, ForumTopicReopened, ForumTopicEdited, ForumTopicCreated, ForumTopicClosed, Dice, Contact, ChatShared, ChatBoostAdded } from './'; | ||
import { ExternalReplyInfo, Sticker, Venue, Location, Animation, Document, MaybeInaccessibleMessage, ChatBackground, GiveawayCompleted, MessageEntity, LinkPreviewOptions, Poll, InlineKeyboardMarkup, User, PassportData, Game, PhotoSize, Audio, Chat, TextQuote, Story, WriteAccessAllowed, ProximityAlertTriggered, Giveaway, GiveawayWinners, WebAppData, Voice, VideoNote, VideoChatStarted, VideoChatScheduled, VideoChatEnded, VideoChatParticipantsInvited, SuccessfulPayment, Video, UsersShared, MessageOrigin, MessageAutoDeleteTimerChanged, Invoice, GiveawayCreated, GeneralForumTopicUnhidden, GeneralForumTopicHidden, ForumTopicReopened, ForumTopicEdited, ForumTopicCreated, ForumTopicClosed, Dice, Contact, ChatShared, ChatBoostAdded, PaidMediaInfo } from './'; | ||
export type Message = { | ||
@@ -32,2 +32,3 @@ message_id: number; | ||
document?: Document; | ||
paid_media?: PaidMediaInfo; | ||
photo?: PhotoSize[]; | ||
@@ -34,0 +35,0 @@ sticker?: Sticker; |
@@ -0,4 +1,6 @@ | ||
declare const emojis: readonly ["๐", "๐", "โค", "๐ฅ", "๐ฅฐ", "๐", "๐", "๐ค", "๐คฏ", "๐ฑ", "๐คฌ", "๐ข", "๐", "๐คฉ", "๐คฎ", "๐ฉ", "๐", "๐", "๐", "๐คก", "๐ฅฑ", "๐ฅด", "๐", "๐ณ", "โคโ๐ฅ", "๐", "๐ญ", "๐ฏ", "๐คฃ", "โก", "๐", "๐", "๐", "๐คจ", "๐", "๐", "๐พ", "๐", "๐", "๐", "๐ด", "๐ญ", "๐ค", "๐ป", "๐จโ๐ป", "๐", "๐", "๐", "๐", "๐จ", "๐ค", "โ", "๐ค", "๐ซก", "๐ ", "๐", "โ", "๐ ", "๐คช", "๐ฟ", "๐", "๐", "๐", "๐ฆ", "๐", "๐", "๐", "๐", "๐พ", "๐คทโโ", "๐คท", "๐คทโโ", "๐ก"]; | ||
export type ReactionTypeEmoji = { | ||
type: 'emoji'; | ||
emoji: string; | ||
emoji: (typeof emojis)[number] | string; | ||
}; | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const emojis = [ | ||
'๐', | ||
'๐', | ||
'โค', | ||
'๐ฅ', | ||
'๐ฅฐ', | ||
'๐', | ||
'๐', | ||
'๐ค', | ||
'๐คฏ', | ||
'๐ฑ', | ||
'๐คฌ', | ||
'๐ข', | ||
'๐', | ||
'๐คฉ', | ||
'๐คฎ', | ||
'๐ฉ', | ||
'๐', | ||
'๐', | ||
'๐', | ||
'๐คก', | ||
'๐ฅฑ', | ||
'๐ฅด', | ||
'๐', | ||
'๐ณ', | ||
'โคโ๐ฅ', | ||
'๐', | ||
'๐ญ', | ||
'๐ฏ', | ||
'๐คฃ', | ||
'โก', | ||
'๐', | ||
'๐', | ||
'๐', | ||
'๐คจ', | ||
'๐', | ||
'๐', | ||
'๐พ', | ||
'๐', | ||
'๐', | ||
'๐', | ||
'๐ด', | ||
'๐ญ', | ||
'๐ค', | ||
'๐ป', | ||
'๐จโ๐ป', | ||
'๐', | ||
'๐', | ||
'๐', | ||
'๐', | ||
'๐จ', | ||
'๐ค', | ||
'โ', | ||
'๐ค', | ||
'๐ซก', | ||
'๐ ', | ||
'๐', | ||
'โ', | ||
'๐ ', | ||
'๐คช', | ||
'๐ฟ', | ||
'๐', | ||
'๐', | ||
'๐', | ||
'๐ฆ', | ||
'๐', | ||
'๐', | ||
'๐', | ||
'๐', | ||
'๐พ', | ||
'๐คทโโ', | ||
'๐คท', | ||
'๐คทโโ', | ||
'๐ก', | ||
]; |
/** | ||
* ## ResponseParameters | ||
* Describes why a request was unsuccessful. | ||
* @see https://core.telegram.org/bots/api#responseparameters | ||
*/ | ||
@@ -5,0 +6,0 @@ export type ResponseParameters = { |
@@ -5,3 +5,4 @@ "use strict"; | ||
* Describes why a request was unsuccessful. | ||
* @see https://core.telegram.org/bots/api#responseparameters | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
import { TransactionPartnerFragment } from './TransactionPartnerFragment'; | ||
import { TransactionPartnerUser } from './TransactionPartnerUser'; | ||
import { TransactionPartnerTelegramAds } from './TransactionPartnerTelegramAds'; | ||
import { TransactionPartnerOther } from './TransactionPartnerOther'; | ||
@@ -7,3 +8,8 @@ /** | ||
* This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of | ||
* - TransactionPartnerFragment | ||
* - TransactionPartnerUser | ||
* - TransactionPartnerTelegramAds | ||
* - TransactionPartnerOther | ||
* @see https://core.telegram.org/bots/api#transactionpartner | ||
*/ | ||
export type TransactionPartner = TransactionPartnerFragment | TransactionPartnerUser | TransactionPartnerOther; | ||
export type TransactionPartner = TransactionPartnerFragment | TransactionPartnerUser | TransactionPartnerTelegramAds | TransactionPartnerOther; |
@@ -16,2 +16,6 @@ import { User } from './User'; | ||
user: User; | ||
/** | ||
* Optional. Bot-specified invoice payload | ||
*/ | ||
invoice_payload: string; | ||
}; |
{ | ||
"type": "commonjs", | ||
"name": "typescript-telegram-bot-api", | ||
"version": "0.1.18", | ||
"version": "0.1.19", | ||
"description": "Telegram Bot API wrapper for Node.js written in TypeScript", | ||
@@ -6,0 +6,0 @@ "repository": "github:Borodin/typescript-telegram-bot-api", |
@@ -5,3 +5,3 @@ # ๐ฆ typescript-telegram-bot-api | ||
[](https://www.npmjs.com/package/typescript-telegram-bot-api) | ||
[](https://core.telegram.org/bots/api#recent-changes) | ||
[](https://core.telegram.org/bots/api#july-1-2024) | ||
[](https://codecov.io/github/Borodin/typescript-telegram-bot-api) | ||
@@ -8,0 +8,0 @@ |
Sorry, the diff of this file is too big to display
256170
448
6139