limber-api-node-telegram
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -6,3 +6,3 @@ 'use strict' | ||
/** | ||
* This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound). | ||
* You can provide an animation for your game so that it looks stylish in chats (check out Lumberjack for an example). This object represents an animation file to be displayed in the message containing a game. | ||
*/ | ||
@@ -14,5 +14,2 @@ | ||
* @param {string} fileId | ||
* @param {number} width | ||
* @param {number} height | ||
* @param {number} duration | ||
* @param {PhotoSize|null} [thumb] | ||
@@ -23,16 +20,4 @@ * @param {string|null} [fileName] | ||
*/ | ||
constructor( | ||
fileId, | ||
width, | ||
height, | ||
duration, | ||
thumb, | ||
fileName, | ||
mimeType, | ||
fileSize | ||
) { | ||
constructor(fileId, thumb, fileName, mimeType, fileSize) { | ||
this._fileId = fileId | ||
this._width = width | ||
this._height = height | ||
this._duration = duration | ||
this._thumb = thumb | ||
@@ -53,26 +38,2 @@ this._fileName = fileName | ||
/** | ||
* Video width as defined by sender | ||
* @returns {number} | ||
*/ | ||
get width() { | ||
return this._width | ||
} | ||
/** | ||
* Video height as defined by sender | ||
* @returns {number} | ||
*/ | ||
get height() { | ||
return this._height | ||
} | ||
/** | ||
* Duration of the video in seconds as defined by sender | ||
* @returns {number} | ||
*/ | ||
get duration() { | ||
return this._duration | ||
} | ||
/** | ||
* Animation thumbnail as defined by sender | ||
@@ -117,5 +78,2 @@ * @returns {PhotoSize|null} | ||
raw['file_id'], | ||
raw['width'], | ||
raw['height'], | ||
raw['duration'], | ||
raw['thumb'] ? PhotoSize.deserialize(raw['thumb']) : null, | ||
@@ -135,5 +93,2 @@ raw['file_name'] ? raw['file_name'] : null, | ||
file_id: this.fileId ? this.fileId : undefined, | ||
width: this.width ? this.width : undefined, | ||
height: this.height ? this.height : undefined, | ||
duration: this.duration ? this.duration : undefined, | ||
thumb: this.thumb ? this.thumb.serialize() : undefined, | ||
@@ -140,0 +95,0 @@ file_name: this.fileName ? this.fileName : undefined, |
'use strict' | ||
const PhotoSize = require('./PhotoSize') | ||
/** | ||
@@ -18,13 +16,4 @@ * This object represents an audio file to be treated as music by the Telegram clients. | ||
* @param {number|null} [fileSize] | ||
* @param {PhotoSize|null} [thumb] | ||
*/ | ||
constructor( | ||
fileId, | ||
duration, | ||
performer, | ||
title, | ||
mimeType, | ||
fileSize, | ||
thumb | ||
) { | ||
constructor(fileId, duration, performer, title, mimeType, fileSize) { | ||
this._fileId = fileId | ||
@@ -36,3 +25,2 @@ this._duration = duration | ||
this._fileSize = fileSize | ||
this._thumb = thumb | ||
} | ||
@@ -89,10 +77,2 @@ | ||
/** | ||
* Thumbnail of the album cover to which the music file belongs | ||
* @returns {PhotoSize|null} | ||
*/ | ||
get thumb() { | ||
return this._thumb | ||
} | ||
/** | ||
* | ||
@@ -109,4 +89,3 @@ * @param {Object} raw | ||
raw['mime_type'] ? raw['mime_type'] : null, | ||
raw['file_size'] ? raw['file_size'] : null, | ||
raw['thumb'] ? PhotoSize.deserialize(raw['thumb']) : null | ||
raw['file_size'] ? raw['file_size'] : null | ||
) | ||
@@ -126,4 +105,3 @@ } | ||
mime_type: this.mimeType ? this.mimeType : undefined, | ||
file_size: this.fileSize ? this.fileSize : undefined, | ||
thumb: this.thumb ? this.thumb.serialize() : undefined | ||
file_size: this.fileSize ? this.fileSize : undefined | ||
} | ||
@@ -130,0 +108,0 @@ } |
'use strict' | ||
const ChatPhoto = require('./ChatPhoto') | ||
const Message = require('./Message') | ||
/** | ||
@@ -20,8 +17,2 @@ * This object represents a chat. | ||
* @param {boolean|null} [allMembersAreAdministrators] | ||
* @param {ChatPhoto|null} [photo] | ||
* @param {string|null} [description] | ||
* @param {string|null} [inviteLink] | ||
* @param {Message|null} [pinnedMessage] | ||
* @param {string|null} [stickerSetName] | ||
* @param {boolean|null} [canSetStickerSet] | ||
*/ | ||
@@ -35,9 +26,3 @@ constructor( | ||
lastName, | ||
allMembersAreAdministrators, | ||
photo, | ||
description, | ||
inviteLink, | ||
pinnedMessage, | ||
stickerSetName, | ||
canSetStickerSet | ||
allMembersAreAdministrators | ||
) { | ||
@@ -51,12 +36,6 @@ this._id = id | ||
this._allMembersAreAdministrators = allMembersAreAdministrators | ||
this._photo = photo | ||
this._description = description | ||
this._inviteLink = inviteLink | ||
this._pinnedMessage = pinnedMessage | ||
this._stickerSetName = stickerSetName | ||
this._canSetStickerSet = canSetStickerSet | ||
} | ||
/** | ||
* Unique identifier for this chat. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. | ||
* Unique identifier for this chat. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. | ||
* @returns {number} | ||
@@ -117,50 +96,2 @@ */ | ||
/** | ||
* Chat photo. Returned only in getChat. | ||
* @returns {ChatPhoto|null} | ||
*/ | ||
get photo() { | ||
return this._photo | ||
} | ||
/** | ||
* Description, for supergroups and channel chats. Returned only in getChat. | ||
* @returns {string|null} | ||
*/ | ||
get description() { | ||
return this._description | ||
} | ||
/** | ||
* Chat invite link, for supergroups and channel chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using exportChatInviteLink. Returned only in getChat. | ||
* @returns {string|null} | ||
*/ | ||
get inviteLink() { | ||
return this._inviteLink | ||
} | ||
/** | ||
* Pinned message, for groups, supergroups and channels. Returned only in getChat. | ||
* @returns {Message|null} | ||
*/ | ||
get pinnedMessage() { | ||
return this._pinnedMessage | ||
} | ||
/** | ||
* For supergroups, name of group sticker set. Returned only in getChat. | ||
* @returns {string|null} | ||
*/ | ||
get stickerSetName() { | ||
return this._stickerSetName | ||
} | ||
/** | ||
* True, if the bot can change the group sticker set. Returned only in getChat. | ||
* @returns {boolean|null} | ||
*/ | ||
get canSetStickerSet() { | ||
return this._canSetStickerSet | ||
} | ||
/** | ||
* | ||
@@ -178,9 +109,3 @@ * @param {Object} raw | ||
raw['last_name'] ? raw['last_name'] : null, | ||
raw['all_members_are_administrators'] ? raw['all_members_are_administrators'] : null, | ||
raw['photo'] ? ChatPhoto.deserialize(raw['photo']) : null, | ||
raw['description'] ? raw['description'] : null, | ||
raw['invite_link'] ? raw['invite_link'] : null, | ||
raw['pinned_message'] ? Message.deserialize(raw['pinned_message']) : null, | ||
raw['sticker_set_name'] ? raw['sticker_set_name'] : null, | ||
raw['can_set_sticker_set'] ? raw['can_set_sticker_set'] : null | ||
raw['all_members_are_administrators'] ? raw['all_members_are_administrators'] : null | ||
) | ||
@@ -201,9 +126,3 @@ } | ||
last_name: this.lastName ? this.lastName : undefined, | ||
all_members_are_administrators: this.allMembersAreAdministrators ? this.allMembersAreAdministrators : undefined, | ||
photo: this.photo ? this.photo.serialize() : undefined, | ||
description: this.description ? this.description : undefined, | ||
invite_link: this.inviteLink ? this.inviteLink : undefined, | ||
pinned_message: this.pinnedMessage ? this.pinnedMessage.serialize() : undefined, | ||
sticker_set_name: this.stickerSetName ? this.stickerSetName : undefined, | ||
can_set_sticker_set: this.canSetStickerSet ? this.canSetStickerSet : undefined | ||
all_members_are_administrators: this.allMembersAreAdministrators ? this.allMembersAreAdministrators : undefined | ||
} | ||
@@ -210,0 +129,0 @@ } |
@@ -6,3 +6,3 @@ 'use strict' | ||
/** | ||
* This object contains information about one member of a chat. | ||
* This object contains information about one member of the chat. | ||
*/ | ||
@@ -15,54 +15,6 @@ | ||
* @param {string} status | ||
* @param {number|null} [untilDate] | ||
* @param {boolean|null} [canBeEdited] | ||
* @param {boolean|null} [canChangeInfo] | ||
* @param {boolean|null} [canPostMessages] | ||
* @param {boolean|null} [canEditMessages] | ||
* @param {boolean|null} [canDeleteMessages] | ||
* @param {boolean|null} [canInviteUsers] | ||
* @param {boolean|null} [canRestrictMembers] | ||
* @param {boolean|null} [canPinMessages] | ||
* @param {boolean|null} [canPromoteMembers] | ||
* @param {boolean|null} [isMember] | ||
* @param {boolean|null} [canSendMessages] | ||
* @param {boolean|null} [canSendMediaMessages] | ||
* @param {boolean|null} [canSendOtherMessages] | ||
* @param {boolean|null} [canAddWebPagePreviews] | ||
*/ | ||
constructor( | ||
user, | ||
status, | ||
untilDate, | ||
canBeEdited, | ||
canChangeInfo, | ||
canPostMessages, | ||
canEditMessages, | ||
canDeleteMessages, | ||
canInviteUsers, | ||
canRestrictMembers, | ||
canPinMessages, | ||
canPromoteMembers, | ||
isMember, | ||
canSendMessages, | ||
canSendMediaMessages, | ||
canSendOtherMessages, | ||
canAddWebPagePreviews | ||
) { | ||
constructor(user, status) { | ||
this._user = user | ||
this._status = status | ||
this._untilDate = untilDate | ||
this._canBeEdited = canBeEdited | ||
this._canChangeInfo = canChangeInfo | ||
this._canPostMessages = canPostMessages | ||
this._canEditMessages = canEditMessages | ||
this._canDeleteMessages = canDeleteMessages | ||
this._canInviteUsers = canInviteUsers | ||
this._canRestrictMembers = canRestrictMembers | ||
this._canPinMessages = canPinMessages | ||
this._canPromoteMembers = canPromoteMembers | ||
this._isMember = isMember | ||
this._canSendMessages = canSendMessages | ||
this._canSendMediaMessages = canSendMediaMessages | ||
this._canSendOtherMessages = canSendOtherMessages | ||
this._canAddWebPagePreviews = canAddWebPagePreviews | ||
} | ||
@@ -79,3 +31,3 @@ | ||
/** | ||
* The member's status in the chat. Can be “creator”, “administrator”, “member”, “restricted”, “left” or “kicked” | ||
* The member's status in the chat. Can be “creator”, “administrator”, “member”, “left” or “kicked” | ||
* @returns {string} | ||
@@ -88,122 +40,2 @@ */ | ||
/** | ||
* Restricted and kicked only. Date when restrictions will be lifted for this user, unix time | ||
* @returns {number|null} | ||
*/ | ||
get untilDate() { | ||
return this._untilDate | ||
} | ||
/** | ||
* Administrators only. True, if the bot is allowed to edit administrator privileges of that user | ||
* @returns {boolean|null} | ||
*/ | ||
get canBeEdited() { | ||
return this._canBeEdited | ||
} | ||
/** | ||
* Administrators only. True, if the administrator can change the chat title, photo and other settings | ||
* @returns {boolean|null} | ||
*/ | ||
get canChangeInfo() { | ||
return this._canChangeInfo | ||
} | ||
/** | ||
* Administrators only. True, if the administrator can post in the channel, channels only | ||
* @returns {boolean|null} | ||
*/ | ||
get canPostMessages() { | ||
return this._canPostMessages | ||
} | ||
/** | ||
* Administrators only. True, if the administrator can edit messages of other users and can pin messages, channels only | ||
* @returns {boolean|null} | ||
*/ | ||
get canEditMessages() { | ||
return this._canEditMessages | ||
} | ||
/** | ||
* Administrators only. True, if the administrator can delete messages of other users | ||
* @returns {boolean|null} | ||
*/ | ||
get canDeleteMessages() { | ||
return this._canDeleteMessages | ||
} | ||
/** | ||
* Administrators only. True, if the administrator can invite new users to the chat | ||
* @returns {boolean|null} | ||
*/ | ||
get canInviteUsers() { | ||
return this._canInviteUsers | ||
} | ||
/** | ||
* Administrators only. True, if the administrator can restrict, ban or unban chat members | ||
* @returns {boolean|null} | ||
*/ | ||
get canRestrictMembers() { | ||
return this._canRestrictMembers | ||
} | ||
/** | ||
* Administrators only. True, if the administrator can pin messages, groups and supergroups only | ||
* @returns {boolean|null} | ||
*/ | ||
get canPinMessages() { | ||
return this._canPinMessages | ||
} | ||
/** | ||
* Administrators only. True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user) | ||
* @returns {boolean|null} | ||
*/ | ||
get canPromoteMembers() { | ||
return this._canPromoteMembers | ||
} | ||
/** | ||
* Restricted only. True, if the user is a member of the chat at the moment of the request | ||
* @returns {boolean|null} | ||
*/ | ||
get isMember() { | ||
return this._isMember | ||
} | ||
/** | ||
* Restricted only. True, if the user can send text messages, contacts, locations and venues | ||
* @returns {boolean|null} | ||
*/ | ||
get canSendMessages() { | ||
return this._canSendMessages | ||
} | ||
/** | ||
* Restricted only. True, if the user can send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages | ||
* @returns {boolean|null} | ||
*/ | ||
get canSendMediaMessages() { | ||
return this._canSendMediaMessages | ||
} | ||
/** | ||
* Restricted only. True, if the user can send animations, games, stickers and use inline bots, implies can_send_media_messages | ||
* @returns {boolean|null} | ||
*/ | ||
get canSendOtherMessages() { | ||
return this._canSendOtherMessages | ||
} | ||
/** | ||
* Restricted only. True, if user may add web page previews to his messages, implies can_send_media_messages | ||
* @returns {boolean|null} | ||
*/ | ||
get canAddWebPagePreviews() { | ||
return this._canAddWebPagePreviews | ||
} | ||
/** | ||
* | ||
@@ -214,21 +46,3 @@ * @param {Object} raw | ||
static deserialize(raw) { | ||
return new ChatMember( | ||
raw['user'] ? User.deserialize(raw['user']) : null, | ||
raw['status'], | ||
raw['until_date'] ? raw['until_date'] : null, | ||
raw['can_be_edited'] ? raw['can_be_edited'] : null, | ||
raw['can_change_info'] ? raw['can_change_info'] : null, | ||
raw['can_post_messages'] ? raw['can_post_messages'] : null, | ||
raw['can_edit_messages'] ? raw['can_edit_messages'] : null, | ||
raw['can_delete_messages'] ? raw['can_delete_messages'] : null, | ||
raw['can_invite_users'] ? raw['can_invite_users'] : null, | ||
raw['can_restrict_members'] ? raw['can_restrict_members'] : null, | ||
raw['can_pin_messages'] ? raw['can_pin_messages'] : null, | ||
raw['can_promote_members'] ? raw['can_promote_members'] : null, | ||
raw['is_member'] ? raw['is_member'] : null, | ||
raw['can_send_messages'] ? raw['can_send_messages'] : null, | ||
raw['can_send_media_messages'] ? raw['can_send_media_messages'] : null, | ||
raw['can_send_other_messages'] ? raw['can_send_other_messages'] : null, | ||
raw['can_add_web_page_previews'] ? raw['can_add_web_page_previews'] : null | ||
) | ||
return new ChatMember(raw['user'] ? User.deserialize(raw['user']) : null, raw['status']) | ||
} | ||
@@ -243,18 +57,3 @@ | ||
user: this.user ? this.user.serialize() : undefined, | ||
status: this.status ? this.status : undefined, | ||
until_date: this.untilDate ? this.untilDate : undefined, | ||
can_be_edited: this.canBeEdited ? this.canBeEdited : undefined, | ||
can_change_info: this.canChangeInfo ? this.canChangeInfo : undefined, | ||
can_post_messages: this.canPostMessages ? this.canPostMessages : undefined, | ||
can_edit_messages: this.canEditMessages ? this.canEditMessages : undefined, | ||
can_delete_messages: this.canDeleteMessages ? this.canDeleteMessages : undefined, | ||
can_invite_users: this.canInviteUsers ? this.canInviteUsers : undefined, | ||
can_restrict_members: this.canRestrictMembers ? this.canRestrictMembers : undefined, | ||
can_pin_messages: this.canPinMessages ? this.canPinMessages : undefined, | ||
can_promote_members: this.canPromoteMembers ? this.canPromoteMembers : undefined, | ||
is_member: this.isMember ? this.isMember : undefined, | ||
can_send_messages: this.canSendMessages ? this.canSendMessages : undefined, | ||
can_send_media_messages: this.canSendMediaMessages ? this.canSendMediaMessages : undefined, | ||
can_send_other_messages: this.canSendOtherMessages ? this.canSendOtherMessages : undefined, | ||
can_add_web_page_previews: this.canAddWebPagePreviews ? this.canAddWebPagePreviews : undefined | ||
status: this.status ? this.status : undefined | ||
} | ||
@@ -261,0 +60,0 @@ } |
@@ -7,3 +7,3 @@ 'use strict' | ||
/** | ||
* Represents a result of an inline query that was chosen by the user and sent to their chat partner. | ||
* Represents a result of an inline query that was chosen by the user and sent to their chat partner. | ||
*/ | ||
@@ -10,0 +10,0 @@ |
@@ -14,5 +14,4 @@ 'use strict' | ||
* @param {number|null} [userId] | ||
* @param {string|null} [vcard] | ||
*/ | ||
constructor(phoneNumber, firstName, lastName, userId, vcard) { | ||
constructor(phoneNumber, firstName, lastName, userId) { | ||
this._phoneNumber = phoneNumber | ||
@@ -22,3 +21,2 @@ this._firstName = firstName | ||
this._userId = userId | ||
this._vcard = vcard | ||
} | ||
@@ -59,10 +57,2 @@ | ||
/** | ||
* Additional data about the contact in the form of a vCard | ||
* @returns {string|null} | ||
*/ | ||
get vcard() { | ||
return this._vcard | ||
} | ||
/** | ||
* | ||
@@ -73,9 +63,3 @@ * @param {Object} raw | ||
static deserialize(raw) { | ||
return new Contact( | ||
raw['phone_number'], | ||
raw['first_name'], | ||
raw['last_name'] ? raw['last_name'] : null, | ||
raw['user_id'] ? raw['user_id'] : null, | ||
raw['vcard'] ? raw['vcard'] : null | ||
) | ||
return new Contact(raw['phone_number'], raw['first_name'], raw['last_name'] ? raw['last_name'] : null, raw['user_id'] ? raw['user_id'] : null) | ||
} | ||
@@ -92,4 +76,3 @@ | ||
last_name: this.lastName ? this.lastName : undefined, | ||
user_id: this.userId ? this.userId : undefined, | ||
vcard: this.vcard ? this.vcard : undefined | ||
user_id: this.userId ? this.userId : undefined | ||
} | ||
@@ -96,0 +79,0 @@ } |
@@ -18,3 +18,2 @@ 'use strict' | ||
* @param {string|null} [caption] | ||
* @param {string|null} [parseMode] | ||
* @param {string|null} [performer] | ||
@@ -31,3 +30,2 @@ * @param {number|null} [audioDuration] | ||
caption, | ||
parseMode, | ||
performer, | ||
@@ -44,3 +42,2 @@ audioDuration, | ||
this._caption = caption | ||
this._parseMode = parseMode | ||
this._performer = performer | ||
@@ -85,3 +82,3 @@ this._audioDuration = audioDuration | ||
/** | ||
* Caption, 0-1024 characters | ||
* Caption, 0-200 characters | ||
* @returns {string|null} | ||
@@ -94,10 +91,2 @@ */ | ||
/** | ||
* Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. | ||
* @returns {string|null} | ||
*/ | ||
get parseMode() { | ||
return this._parseMode | ||
} | ||
/** | ||
* Performer | ||
@@ -146,3 +135,2 @@ * @returns {string|null} | ||
raw['caption'] ? raw['caption'] : null, | ||
raw['parse_mode'] ? raw['parse_mode'] : null, | ||
raw['performer'] ? raw['performer'] : null, | ||
@@ -166,3 +154,2 @@ raw['audio_duration'] ? raw['audio_duration'] : null, | ||
caption: this.caption ? this.caption : undefined, | ||
parse_mode: this.parseMode ? this.parseMode : undefined, | ||
performer: this.performer ? this.performer : undefined, | ||
@@ -169,0 +156,0 @@ audio_duration: this.audioDuration ? this.audioDuration : undefined, |
@@ -17,15 +17,6 @@ 'use strict' | ||
* @param {string|null} [caption] | ||
* @param {string|null} [parseMode] | ||
* @param {InlineKeyboardMarkup|null} [replyMarkup] | ||
* @param {InputMessageContent|null} [inputMessageContent] | ||
*/ | ||
constructor( | ||
type, | ||
id, | ||
audioFileId, | ||
caption, | ||
parseMode, | ||
replyMarkup, | ||
inputMessageContent | ||
) { | ||
constructor(type, id, audioFileId, caption, replyMarkup, inputMessageContent) { | ||
super() | ||
@@ -36,3 +27,2 @@ this._type = type | ||
this._caption = caption | ||
this._parseMode = parseMode | ||
this._replyMarkup = replyMarkup | ||
@@ -67,3 +57,3 @@ this._inputMessageContent = inputMessageContent | ||
/** | ||
* Caption, 0-1024 characters | ||
* Caption, 0-200 characters | ||
* @returns {string|null} | ||
@@ -76,10 +66,2 @@ */ | ||
/** | ||
* Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. | ||
* @returns {string|null} | ||
*/ | ||
get parseMode() { | ||
return this._parseMode | ||
} | ||
/** | ||
* Inline keyboard attached to the message | ||
@@ -111,3 +93,2 @@ * @returns {InlineKeyboardMarkup|null} | ||
raw['caption'] ? raw['caption'] : null, | ||
raw['parse_mode'] ? raw['parse_mode'] : null, | ||
raw['reply_markup'] ? InlineKeyboardMarkup.deserialize(raw['reply_markup']) : null, | ||
@@ -128,3 +109,2 @@ raw['input_message_content'] ? InputMessageContent.deserialize(raw['input_message_content']) : null | ||
caption: this.caption ? this.caption : undefined, | ||
parse_mode: this.parseMode ? this.parseMode : undefined, | ||
reply_markup: this.replyMarkup ? this.replyMarkup.serialize() : undefined, | ||
@@ -131,0 +111,0 @@ input_message_content: this.inputMessageContent ? this.inputMessageContent.serialize() : undefined |
@@ -19,3 +19,2 @@ 'use strict' | ||
* @param {string|null} [caption] | ||
* @param {string|null} [parseMode] | ||
* @param {InlineKeyboardMarkup|null} [replyMarkup] | ||
@@ -31,3 +30,2 @@ * @param {InputMessageContent|null} [inputMessageContent] | ||
caption, | ||
parseMode, | ||
replyMarkup, | ||
@@ -43,3 +41,2 @@ inputMessageContent | ||
this._caption = caption | ||
this._parseMode = parseMode | ||
this._replyMarkup = replyMarkup | ||
@@ -90,3 +87,3 @@ this._inputMessageContent = inputMessageContent | ||
/** | ||
* Caption of the document to be sent, 0-1024 characters | ||
* Caption of the document to be sent, 0-200 characters | ||
* @returns {string|null} | ||
@@ -99,10 +96,2 @@ */ | ||
/** | ||
* Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. | ||
* @returns {string|null} | ||
*/ | ||
get parseMode() { | ||
return this._parseMode | ||
} | ||
/** | ||
* Inline keyboard attached to the message | ||
@@ -136,3 +125,2 @@ * @returns {InlineKeyboardMarkup|null} | ||
raw['caption'] ? raw['caption'] : null, | ||
raw['parse_mode'] ? raw['parse_mode'] : null, | ||
raw['reply_markup'] ? InlineKeyboardMarkup.deserialize(raw['reply_markup']) : null, | ||
@@ -155,3 +143,2 @@ raw['input_message_content'] ? InputMessageContent.deserialize(raw['input_message_content']) : null | ||
caption: this.caption ? this.caption : undefined, | ||
parse_mode: this.parseMode ? this.parseMode : undefined, | ||
reply_markup: this.replyMarkup ? this.replyMarkup.serialize() : undefined, | ||
@@ -158,0 +145,0 @@ input_message_content: this.inputMessageContent ? this.inputMessageContent.serialize() : undefined |
@@ -18,3 +18,2 @@ 'use strict' | ||
* @param {string|null} [caption] | ||
* @param {string|null} [parseMode] | ||
* @param {InlineKeyboardMarkup|null} [replyMarkup] | ||
@@ -29,3 +28,2 @@ * @param {InputMessageContent|null} [inputMessageContent] | ||
caption, | ||
parseMode, | ||
replyMarkup, | ||
@@ -40,3 +38,2 @@ inputMessageContent | ||
this._caption = caption | ||
this._parseMode = parseMode | ||
this._replyMarkup = replyMarkup | ||
@@ -79,3 +76,3 @@ this._inputMessageContent = inputMessageContent | ||
/** | ||
* Caption of the GIF file to be sent, 0-1024 characters | ||
* Caption of the GIF file to be sent, 0-200 characters | ||
* @returns {string|null} | ||
@@ -88,10 +85,2 @@ */ | ||
/** | ||
* Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. | ||
* @returns {string|null} | ||
*/ | ||
get parseMode() { | ||
return this._parseMode | ||
} | ||
/** | ||
* Inline keyboard attached to the message | ||
@@ -124,3 +113,2 @@ * @returns {InlineKeyboardMarkup|null} | ||
raw['caption'] ? raw['caption'] : null, | ||
raw['parse_mode'] ? raw['parse_mode'] : null, | ||
raw['reply_markup'] ? InlineKeyboardMarkup.deserialize(raw['reply_markup']) : null, | ||
@@ -142,3 +130,2 @@ raw['input_message_content'] ? InputMessageContent.deserialize(raw['input_message_content']) : null | ||
caption: this.caption ? this.caption : undefined, | ||
parse_mode: this.parseMode ? this.parseMode : undefined, | ||
reply_markup: this.replyMarkup ? this.replyMarkup.serialize() : undefined, | ||
@@ -145,0 +132,0 @@ input_message_content: this.inputMessageContent ? this.inputMessageContent.serialize() : undefined |
@@ -18,3 +18,2 @@ 'use strict' | ||
* @param {string|null} [caption] | ||
* @param {string|null} [parseMode] | ||
* @param {InlineKeyboardMarkup|null} [replyMarkup] | ||
@@ -29,3 +28,2 @@ * @param {InputMessageContent|null} [inputMessageContent] | ||
caption, | ||
parseMode, | ||
replyMarkup, | ||
@@ -40,3 +38,2 @@ inputMessageContent | ||
this._caption = caption | ||
this._parseMode = parseMode | ||
this._replyMarkup = replyMarkup | ||
@@ -79,3 +76,3 @@ this._inputMessageContent = inputMessageContent | ||
/** | ||
* Caption of the MPEG-4 file to be sent, 0-1024 characters | ||
* Caption of the MPEG-4 file to be sent, 0-200 characters | ||
* @returns {string|null} | ||
@@ -88,10 +85,2 @@ */ | ||
/** | ||
* Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. | ||
* @returns {string|null} | ||
*/ | ||
get parseMode() { | ||
return this._parseMode | ||
} | ||
/** | ||
* Inline keyboard attached to the message | ||
@@ -124,3 +113,2 @@ * @returns {InlineKeyboardMarkup|null} | ||
raw['caption'] ? raw['caption'] : null, | ||
raw['parse_mode'] ? raw['parse_mode'] : null, | ||
raw['reply_markup'] ? InlineKeyboardMarkup.deserialize(raw['reply_markup']) : null, | ||
@@ -142,3 +130,2 @@ raw['input_message_content'] ? InputMessageContent.deserialize(raw['input_message_content']) : null | ||
caption: this.caption ? this.caption : undefined, | ||
parse_mode: this.parseMode ? this.parseMode : undefined, | ||
reply_markup: this.replyMarkup ? this.replyMarkup.serialize() : undefined, | ||
@@ -145,0 +132,0 @@ input_message_content: this.inputMessageContent ? this.inputMessageContent.serialize() : undefined |
@@ -19,3 +19,2 @@ 'use strict' | ||
* @param {string|null} [caption] | ||
* @param {string|null} [parseMode] | ||
* @param {InlineKeyboardMarkup|null} [replyMarkup] | ||
@@ -31,3 +30,2 @@ * @param {InputMessageContent|null} [inputMessageContent] | ||
caption, | ||
parseMode, | ||
replyMarkup, | ||
@@ -43,3 +41,2 @@ inputMessageContent | ||
this._caption = caption | ||
this._parseMode = parseMode | ||
this._replyMarkup = replyMarkup | ||
@@ -90,3 +87,3 @@ this._inputMessageContent = inputMessageContent | ||
/** | ||
* Caption of the photo to be sent, 0-1024 characters | ||
* Caption of the photo to be sent, 0-200 characters | ||
* @returns {string|null} | ||
@@ -99,10 +96,2 @@ */ | ||
/** | ||
* Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. | ||
* @returns {string|null} | ||
*/ | ||
get parseMode() { | ||
return this._parseMode | ||
} | ||
/** | ||
* Inline keyboard attached to the message | ||
@@ -136,3 +125,2 @@ * @returns {InlineKeyboardMarkup|null} | ||
raw['caption'] ? raw['caption'] : null, | ||
raw['parse_mode'] ? raw['parse_mode'] : null, | ||
raw['reply_markup'] ? InlineKeyboardMarkup.deserialize(raw['reply_markup']) : null, | ||
@@ -155,3 +143,2 @@ raw['input_message_content'] ? InputMessageContent.deserialize(raw['input_message_content']) : null | ||
caption: this.caption ? this.caption : undefined, | ||
parse_mode: this.parseMode ? this.parseMode : undefined, | ||
reply_markup: this.replyMarkup ? this.replyMarkup.serialize() : undefined, | ||
@@ -158,0 +145,0 @@ input_message_content: this.inputMessageContent ? this.inputMessageContent.serialize() : undefined |
@@ -19,3 +19,2 @@ 'use strict' | ||
* @param {string|null} [caption] | ||
* @param {string|null} [parseMode] | ||
* @param {InlineKeyboardMarkup|null} [replyMarkup] | ||
@@ -31,3 +30,2 @@ * @param {InputMessageContent|null} [inputMessageContent] | ||
caption, | ||
parseMode, | ||
replyMarkup, | ||
@@ -43,3 +41,2 @@ inputMessageContent | ||
this._caption = caption | ||
this._parseMode = parseMode | ||
this._replyMarkup = replyMarkup | ||
@@ -90,3 +87,3 @@ this._inputMessageContent = inputMessageContent | ||
/** | ||
* Caption of the video to be sent, 0-1024 characters | ||
* Caption of the video to be sent, 0-200 characters | ||
* @returns {string|null} | ||
@@ -99,10 +96,2 @@ */ | ||
/** | ||
* Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. | ||
* @returns {string|null} | ||
*/ | ||
get parseMode() { | ||
return this._parseMode | ||
} | ||
/** | ||
* Inline keyboard attached to the message | ||
@@ -136,3 +125,2 @@ * @returns {InlineKeyboardMarkup|null} | ||
raw['caption'] ? raw['caption'] : null, | ||
raw['parse_mode'] ? raw['parse_mode'] : null, | ||
raw['reply_markup'] ? InlineKeyboardMarkup.deserialize(raw['reply_markup']) : null, | ||
@@ -155,3 +143,2 @@ raw['input_message_content'] ? InputMessageContent.deserialize(raw['input_message_content']) : null | ||
caption: this.caption ? this.caption : undefined, | ||
parse_mode: this.parseMode ? this.parseMode : undefined, | ||
reply_markup: this.replyMarkup ? this.replyMarkup.serialize() : undefined, | ||
@@ -158,0 +145,0 @@ input_message_content: this.inputMessageContent ? this.inputMessageContent.serialize() : undefined |
@@ -18,3 +18,2 @@ 'use strict' | ||
* @param {string|null} [caption] | ||
* @param {string|null} [parseMode] | ||
* @param {InlineKeyboardMarkup|null} [replyMarkup] | ||
@@ -29,3 +28,2 @@ * @param {InputMessageContent|null} [inputMessageContent] | ||
caption, | ||
parseMode, | ||
replyMarkup, | ||
@@ -40,3 +38,2 @@ inputMessageContent | ||
this._caption = caption | ||
this._parseMode = parseMode | ||
this._replyMarkup = replyMarkup | ||
@@ -79,3 +76,3 @@ this._inputMessageContent = inputMessageContent | ||
/** | ||
* Caption, 0-1024 characters | ||
* Caption, 0-200 characters | ||
* @returns {string|null} | ||
@@ -88,10 +85,2 @@ */ | ||
/** | ||
* Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. | ||
* @returns {string|null} | ||
*/ | ||
get parseMode() { | ||
return this._parseMode | ||
} | ||
/** | ||
* Inline keyboard attached to the message | ||
@@ -124,3 +113,2 @@ * @returns {InlineKeyboardMarkup|null} | ||
raw['caption'] ? raw['caption'] : null, | ||
raw['parse_mode'] ? raw['parse_mode'] : null, | ||
raw['reply_markup'] ? InlineKeyboardMarkup.deserialize(raw['reply_markup']) : null, | ||
@@ -142,3 +130,2 @@ raw['input_message_content'] ? InputMessageContent.deserialize(raw['input_message_content']) : null | ||
caption: this.caption ? this.caption : undefined, | ||
parse_mode: this.parseMode ? this.parseMode : undefined, | ||
reply_markup: this.replyMarkup ? this.replyMarkup.serialize() : undefined, | ||
@@ -145,0 +132,0 @@ input_message_content: this.inputMessageContent ? this.inputMessageContent.serialize() : undefined |
@@ -18,3 +18,2 @@ 'use strict' | ||
* @param {string|null} [lastName] | ||
* @param {string|null} [vcard] | ||
* @param {InlineKeyboardMarkup|null} [replyMarkup] | ||
@@ -32,3 +31,2 @@ * @param {InputMessageContent|null} [inputMessageContent] | ||
lastName, | ||
vcard, | ||
replyMarkup, | ||
@@ -46,3 +44,2 @@ inputMessageContent, | ||
this._lastName = lastName | ||
this._vcard = vcard | ||
this._replyMarkup = replyMarkup | ||
@@ -96,10 +93,2 @@ this._inputMessageContent = inputMessageContent | ||
/** | ||
* Additional data about the contact in the form of a vCard, 0-2048 bytes | ||
* @returns {string|null} | ||
*/ | ||
get vcard() { | ||
return this._vcard | ||
} | ||
/** | ||
* Inline keyboard attached to the message | ||
@@ -156,3 +145,2 @@ * @returns {InlineKeyboardMarkup|null} | ||
raw['last_name'] ? raw['last_name'] : null, | ||
raw['vcard'] ? raw['vcard'] : null, | ||
raw['reply_markup'] ? InlineKeyboardMarkup.deserialize(raw['reply_markup']) : null, | ||
@@ -177,3 +165,2 @@ raw['input_message_content'] ? InputMessageContent.deserialize(raw['input_message_content']) : null, | ||
last_name: this.lastName ? this.lastName : undefined, | ||
vcard: this.vcard ? this.vcard : undefined, | ||
reply_markup: this.replyMarkup ? this.replyMarkup.serialize() : undefined, | ||
@@ -180,0 +167,0 @@ input_message_content: this.inputMessageContent ? this.inputMessageContent.serialize() : undefined, |
@@ -17,3 +17,2 @@ 'use strict' | ||
* @param {string|null} [caption] | ||
* @param {string|null} [parseMode] | ||
* @param {string} documentUrl | ||
@@ -33,3 +32,2 @@ * @param {string} mimeType | ||
caption, | ||
parseMode, | ||
documentUrl, | ||
@@ -49,3 +47,2 @@ mimeType, | ||
this._caption = caption | ||
this._parseMode = parseMode | ||
this._documentUrl = documentUrl | ||
@@ -86,3 +83,3 @@ this._mimeType = mimeType | ||
/** | ||
* Caption of the document to be sent, 0-1024 characters | ||
* Caption of the document to be sent, 0-200 characters | ||
* @returns {string|null} | ||
@@ -95,10 +92,2 @@ */ | ||
/** | ||
* Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. | ||
* @returns {string|null} | ||
*/ | ||
get parseMode() { | ||
return this._parseMode | ||
} | ||
/** | ||
* A valid URL for the file | ||
@@ -178,3 +167,2 @@ * @returns {string} | ||
raw['caption'] ? raw['caption'] : null, | ||
raw['parse_mode'] ? raw['parse_mode'] : null, | ||
raw['document_url'], | ||
@@ -201,3 +189,2 @@ raw['mime_type'], | ||
caption: this.caption ? this.caption : undefined, | ||
parse_mode: this.parseMode ? this.parseMode : undefined, | ||
document_url: this.documentUrl ? this.documentUrl : undefined, | ||
@@ -204,0 +191,0 @@ mime_type: this.mimeType ? this.mimeType : undefined, |
@@ -18,7 +18,5 @@ 'use strict' | ||
* @param {number|null} [gifHeight] | ||
* @param {number|null} [gifDuration] | ||
* @param {string} thumbUrl | ||
* @param {string|null} [title] | ||
* @param {string|null} [caption] | ||
* @param {string|null} [parseMode] | ||
* @param {InlineKeyboardMarkup|null} [replyMarkup] | ||
@@ -33,7 +31,5 @@ * @param {InputMessageContent|null} [inputMessageContent] | ||
gifHeight, | ||
gifDuration, | ||
thumbUrl, | ||
title, | ||
caption, | ||
parseMode, | ||
replyMarkup, | ||
@@ -48,7 +44,5 @@ inputMessageContent | ||
this._gifHeight = gifHeight | ||
this._gifDuration = gifDuration | ||
this._thumbUrl = thumbUrl | ||
this._title = title | ||
this._caption = caption | ||
this._parseMode = parseMode | ||
this._replyMarkup = replyMarkup | ||
@@ -99,10 +93,2 @@ this._inputMessageContent = inputMessageContent | ||
/** | ||
* Duration of the GIF | ||
* @returns {number|null} | ||
*/ | ||
get gifDuration() { | ||
return this._gifDuration | ||
} | ||
/** | ||
* URL of the static thumbnail for the result (jpeg or gif) | ||
@@ -124,3 +110,3 @@ * @returns {string} | ||
/** | ||
* Caption of the GIF file to be sent, 0-1024 characters | ||
* Caption of the GIF file to be sent, 0-200 characters | ||
* @returns {string|null} | ||
@@ -133,10 +119,2 @@ */ | ||
/** | ||
* Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. | ||
* @returns {string|null} | ||
*/ | ||
get parseMode() { | ||
return this._parseMode | ||
} | ||
/** | ||
* Inline keyboard attached to the message | ||
@@ -169,7 +147,5 @@ * @returns {InlineKeyboardMarkup|null} | ||
raw['gif_height'] ? raw['gif_height'] : null, | ||
raw['gif_duration'] ? raw['gif_duration'] : null, | ||
raw['thumb_url'], | ||
raw['title'] ? raw['title'] : null, | ||
raw['caption'] ? raw['caption'] : null, | ||
raw['parse_mode'] ? raw['parse_mode'] : null, | ||
raw['reply_markup'] ? InlineKeyboardMarkup.deserialize(raw['reply_markup']) : null, | ||
@@ -191,7 +167,5 @@ raw['input_message_content'] ? InputMessageContent.deserialize(raw['input_message_content']) : null | ||
gif_height: this.gifHeight ? this.gifHeight : undefined, | ||
gif_duration: this.gifDuration ? this.gifDuration : undefined, | ||
thumb_url: this.thumbUrl ? this.thumbUrl : undefined, | ||
title: this.title ? this.title : undefined, | ||
caption: this.caption ? this.caption : undefined, | ||
parse_mode: this.parseMode ? this.parseMode : undefined, | ||
reply_markup: this.replyMarkup ? this.replyMarkup.serialize() : undefined, | ||
@@ -198,0 +172,0 @@ input_message_content: this.inputMessageContent ? this.inputMessageContent.serialize() : undefined |
@@ -18,3 +18,2 @@ 'use strict' | ||
* @param {string} title | ||
* @param {number|null} [livePeriod] | ||
* @param {InlineKeyboardMarkup|null} [replyMarkup] | ||
@@ -32,3 +31,2 @@ * @param {InputMessageContent|null} [inputMessageContent] | ||
title, | ||
livePeriod, | ||
replyMarkup, | ||
@@ -46,3 +44,2 @@ inputMessageContent, | ||
this._title = title | ||
this._livePeriod = livePeriod | ||
this._replyMarkup = replyMarkup | ||
@@ -96,10 +93,2 @@ this._inputMessageContent = inputMessageContent | ||
/** | ||
* Period in seconds for which the location can be updated, should be between 60 and 86400. | ||
* @returns {number|null} | ||
*/ | ||
get livePeriod() { | ||
return this._livePeriod | ||
} | ||
/** | ||
* Inline keyboard attached to the message | ||
@@ -156,3 +145,2 @@ * @returns {InlineKeyboardMarkup|null} | ||
raw['title'], | ||
raw['live_period'] ? raw['live_period'] : null, | ||
raw['reply_markup'] ? InlineKeyboardMarkup.deserialize(raw['reply_markup']) : null, | ||
@@ -177,3 +165,2 @@ raw['input_message_content'] ? InputMessageContent.deserialize(raw['input_message_content']) : null, | ||
title: this.title ? this.title : undefined, | ||
live_period: this.livePeriod ? this.livePeriod : undefined, | ||
reply_markup: this.replyMarkup ? this.replyMarkup.serialize() : undefined, | ||
@@ -180,0 +167,0 @@ input_message_content: this.inputMessageContent ? this.inputMessageContent.serialize() : undefined, |
@@ -18,7 +18,5 @@ 'use strict' | ||
* @param {number|null} [mpeg4Height] | ||
* @param {number|null} [mpeg4Duration] | ||
* @param {string} thumbUrl | ||
* @param {string|null} [title] | ||
* @param {string|null} [caption] | ||
* @param {string|null} [parseMode] | ||
* @param {InlineKeyboardMarkup|null} [replyMarkup] | ||
@@ -33,7 +31,5 @@ * @param {InputMessageContent|null} [inputMessageContent] | ||
mpeg4Height, | ||
mpeg4Duration, | ||
thumbUrl, | ||
title, | ||
caption, | ||
parseMode, | ||
replyMarkup, | ||
@@ -48,7 +44,5 @@ inputMessageContent | ||
this._mpeg4Height = mpeg4Height | ||
this._mpeg4Duration = mpeg4Duration | ||
this._thumbUrl = thumbUrl | ||
this._title = title | ||
this._caption = caption | ||
this._parseMode = parseMode | ||
this._replyMarkup = replyMarkup | ||
@@ -99,10 +93,2 @@ this._inputMessageContent = inputMessageContent | ||
/** | ||
* Video duration | ||
* @returns {number|null} | ||
*/ | ||
get mpeg4Duration() { | ||
return this._mpeg4Duration | ||
} | ||
/** | ||
* URL of the static thumbnail (jpeg or gif) for the result | ||
@@ -124,3 +110,3 @@ * @returns {string} | ||
/** | ||
* Caption of the MPEG-4 file to be sent, 0-1024 characters | ||
* Caption of the MPEG-4 file to be sent, 0-200 characters | ||
* @returns {string|null} | ||
@@ -133,10 +119,2 @@ */ | ||
/** | ||
* Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. | ||
* @returns {string|null} | ||
*/ | ||
get parseMode() { | ||
return this._parseMode | ||
} | ||
/** | ||
* Inline keyboard attached to the message | ||
@@ -169,7 +147,5 @@ * @returns {InlineKeyboardMarkup|null} | ||
raw['mpeg4_height'] ? raw['mpeg4_height'] : null, | ||
raw['mpeg4_duration'] ? raw['mpeg4_duration'] : null, | ||
raw['thumb_url'], | ||
raw['title'] ? raw['title'] : null, | ||
raw['caption'] ? raw['caption'] : null, | ||
raw['parse_mode'] ? raw['parse_mode'] : null, | ||
raw['reply_markup'] ? InlineKeyboardMarkup.deserialize(raw['reply_markup']) : null, | ||
@@ -191,7 +167,5 @@ raw['input_message_content'] ? InputMessageContent.deserialize(raw['input_message_content']) : null | ||
mpeg4_height: this.mpeg4Height ? this.mpeg4Height : undefined, | ||
mpeg4_duration: this.mpeg4Duration ? this.mpeg4Duration : undefined, | ||
thumb_url: this.thumbUrl ? this.thumbUrl : undefined, | ||
title: this.title ? this.title : undefined, | ||
caption: this.caption ? this.caption : undefined, | ||
parse_mode: this.parseMode ? this.parseMode : undefined, | ||
reply_markup: this.replyMarkup ? this.replyMarkup.serialize() : undefined, | ||
@@ -198,0 +172,0 @@ input_message_content: this.inputMessageContent ? this.inputMessageContent.serialize() : undefined |
@@ -22,3 +22,2 @@ 'use strict' | ||
* @param {string|null} [caption] | ||
* @param {string|null} [parseMode] | ||
* @param {InlineKeyboardMarkup|null} [replyMarkup] | ||
@@ -37,3 +36,2 @@ * @param {InputMessageContent|null} [inputMessageContent] | ||
caption, | ||
parseMode, | ||
replyMarkup, | ||
@@ -52,3 +50,2 @@ inputMessageContent | ||
this._caption = caption | ||
this._parseMode = parseMode | ||
this._replyMarkup = replyMarkup | ||
@@ -123,3 +120,3 @@ this._inputMessageContent = inputMessageContent | ||
/** | ||
* Caption of the photo to be sent, 0-1024 characters | ||
* Caption of the photo to be sent, 0-200 characters | ||
* @returns {string|null} | ||
@@ -132,10 +129,2 @@ */ | ||
/** | ||
* Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. | ||
* @returns {string|null} | ||
*/ | ||
get parseMode() { | ||
return this._parseMode | ||
} | ||
/** | ||
* Inline keyboard attached to the message | ||
@@ -172,3 +161,2 @@ * @returns {InlineKeyboardMarkup|null} | ||
raw['caption'] ? raw['caption'] : null, | ||
raw['parse_mode'] ? raw['parse_mode'] : null, | ||
raw['reply_markup'] ? InlineKeyboardMarkup.deserialize(raw['reply_markup']) : null, | ||
@@ -194,3 +182,2 @@ raw['input_message_content'] ? InputMessageContent.deserialize(raw['input_message_content']) : null | ||
caption: this.caption ? this.caption : undefined, | ||
parse_mode: this.parseMode ? this.parseMode : undefined, | ||
reply_markup: this.replyMarkup ? this.replyMarkup.serialize() : undefined, | ||
@@ -197,0 +184,0 @@ input_message_content: this.inputMessageContent ? this.inputMessageContent.serialize() : undefined |
@@ -20,3 +20,2 @@ 'use strict' | ||
* @param {string|null} [foursquareId] | ||
* @param {string|null} [foursquareType] | ||
* @param {InlineKeyboardMarkup|null} [replyMarkup] | ||
@@ -36,3 +35,2 @@ * @param {InputMessageContent|null} [inputMessageContent] | ||
foursquareId, | ||
foursquareType, | ||
replyMarkup, | ||
@@ -52,3 +50,2 @@ inputMessageContent, | ||
this._foursquareId = foursquareId | ||
this._foursquareType = foursquareType | ||
this._replyMarkup = replyMarkup | ||
@@ -118,10 +115,2 @@ this._inputMessageContent = inputMessageContent | ||
/** | ||
* Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) | ||
* @returns {string|null} | ||
*/ | ||
get foursquareType() { | ||
return this._foursquareType | ||
} | ||
/** | ||
* Inline keyboard attached to the message | ||
@@ -180,3 +169,2 @@ * @returns {InlineKeyboardMarkup|null} | ||
raw['foursquare_id'] ? raw['foursquare_id'] : null, | ||
raw['foursquare_type'] ? raw['foursquare_type'] : null, | ||
raw['reply_markup'] ? InlineKeyboardMarkup.deserialize(raw['reply_markup']) : null, | ||
@@ -203,3 +191,2 @@ raw['input_message_content'] ? InputMessageContent.deserialize(raw['input_message_content']) : null, | ||
foursquare_id: this.foursquareId ? this.foursquareId : undefined, | ||
foursquare_type: this.foursquareType ? this.foursquareType : undefined, | ||
reply_markup: this.replyMarkup ? this.replyMarkup.serialize() : undefined, | ||
@@ -206,0 +193,0 @@ input_message_content: this.inputMessageContent ? this.inputMessageContent.serialize() : undefined, |
@@ -20,3 +20,2 @@ 'use strict' | ||
* @param {string|null} [caption] | ||
* @param {string|null} [parseMode] | ||
* @param {number|null} [videoWidth] | ||
@@ -37,3 +36,2 @@ * @param {number|null} [videoHeight] | ||
caption, | ||
parseMode, | ||
videoWidth, | ||
@@ -54,3 +52,2 @@ videoHeight, | ||
this._caption = caption | ||
this._parseMode = parseMode | ||
this._videoWidth = videoWidth | ||
@@ -113,3 +110,3 @@ this._videoHeight = videoHeight | ||
/** | ||
* Caption of the video to be sent, 0-1024 characters | ||
* Caption of the video to be sent, 0-200 characters | ||
* @returns {string|null} | ||
@@ -122,10 +119,2 @@ */ | ||
/** | ||
* Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. | ||
* @returns {string|null} | ||
*/ | ||
get parseMode() { | ||
return this._parseMode | ||
} | ||
/** | ||
* Video width | ||
@@ -171,3 +160,3 @@ * @returns {number|null} | ||
/** | ||
* Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video). | ||
* Content of the message to be sent instead of the video | ||
* @returns {InputMessageContent|null} | ||
@@ -193,3 +182,2 @@ */ | ||
raw['caption'] ? raw['caption'] : null, | ||
raw['parse_mode'] ? raw['parse_mode'] : null, | ||
raw['video_width'] ? raw['video_width'] : null, | ||
@@ -217,3 +205,2 @@ raw['video_height'] ? raw['video_height'] : null, | ||
caption: this.caption ? this.caption : undefined, | ||
parse_mode: this.parseMode ? this.parseMode : undefined, | ||
video_width: this.videoWidth ? this.videoWidth : undefined, | ||
@@ -220,0 +207,0 @@ video_height: this.videoHeight ? this.videoHeight : undefined, |
@@ -18,3 +18,2 @@ 'use strict' | ||
* @param {string|null} [caption] | ||
* @param {string|null} [parseMode] | ||
* @param {number|null} [voiceDuration] | ||
@@ -30,3 +29,2 @@ * @param {InlineKeyboardMarkup|null} [replyMarkup] | ||
caption, | ||
parseMode, | ||
voiceDuration, | ||
@@ -42,3 +40,2 @@ replyMarkup, | ||
this._caption = caption | ||
this._parseMode = parseMode | ||
this._voiceDuration = voiceDuration | ||
@@ -82,3 +79,3 @@ this._replyMarkup = replyMarkup | ||
/** | ||
* Caption, 0-1024 characters | ||
* Caption, 0-200 characters | ||
* @returns {string|null} | ||
@@ -91,10 +88,2 @@ */ | ||
/** | ||
* Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. | ||
* @returns {string|null} | ||
*/ | ||
get parseMode() { | ||
return this._parseMode | ||
} | ||
/** | ||
* Recording duration in seconds | ||
@@ -135,3 +124,2 @@ * @returns {number|null} | ||
raw['caption'] ? raw['caption'] : null, | ||
raw['parse_mode'] ? raw['parse_mode'] : null, | ||
raw['voice_duration'] ? raw['voice_duration'] : null, | ||
@@ -154,3 +142,2 @@ raw['reply_markup'] ? InlineKeyboardMarkup.deserialize(raw['reply_markup']) : null, | ||
caption: this.caption ? this.caption : undefined, | ||
parse_mode: this.parseMode ? this.parseMode : undefined, | ||
voice_duration: this.voiceDuration ? this.voiceDuration : undefined, | ||
@@ -157,0 +144,0 @@ reply_markup: this.replyMarkup ? this.replyMarkup.serialize() : undefined, |
@@ -5,3 +5,3 @@ 'use strict' | ||
/** | ||
* Represents the content of a contact message to be sent as the result of an inline query. | ||
* Represents the content of a contact message to be sent as the result of an inline query. | ||
*/ | ||
@@ -15,5 +15,4 @@ | ||
* @param {string|null} [lastName] | ||
* @param {string|null} [vcard] | ||
*/ | ||
constructor(phoneNumber, firstName, lastName, vcard) { | ||
constructor(phoneNumber, firstName, lastName) { | ||
super() | ||
@@ -23,3 +22,2 @@ this._phoneNumber = phoneNumber | ||
this._lastName = lastName | ||
this._vcard = vcard | ||
} | ||
@@ -52,10 +50,2 @@ | ||
/** | ||
* Additional data about the contact in the form of a vCard, 0-2048 bytes | ||
* @returns {string|null} | ||
*/ | ||
get vcard() { | ||
return this._vcard | ||
} | ||
/** | ||
* | ||
@@ -66,3 +56,3 @@ * @param {Object} raw | ||
static deserialize(raw) { | ||
return new InputContactMessageContent(raw['phone_number'], raw['first_name'], raw['last_name'] ? raw['last_name'] : null, raw['vcard'] ? raw['vcard'] : null) | ||
return new InputContactMessageContent(raw['phone_number'], raw['first_name'], raw['last_name'] ? raw['last_name'] : null) | ||
} | ||
@@ -78,4 +68,3 @@ | ||
first_name: this.firstName ? this.firstName : undefined, | ||
last_name: this.lastName ? this.lastName : undefined, | ||
vcard: this.vcard ? this.vcard : undefined | ||
last_name: this.lastName ? this.lastName : undefined | ||
} | ||
@@ -82,0 +71,0 @@ } |
@@ -5,3 +5,3 @@ 'use strict' | ||
/** | ||
* Represents the content of a location message to be sent as the result of an inline query. | ||
* Represents the content of a location message to be sent as the result of an inline query. | ||
*/ | ||
@@ -14,9 +14,7 @@ | ||
* @param {number} longitude | ||
* @param {number|null} [livePeriod] | ||
*/ | ||
constructor(latitude, longitude, livePeriod) { | ||
constructor(latitude, longitude) { | ||
super() | ||
this._latitude = latitude | ||
this._longitude = longitude | ||
this._livePeriod = livePeriod | ||
} | ||
@@ -41,10 +39,2 @@ | ||
/** | ||
* Period in seconds for which the location can be updated, should be between 60 and 86400. | ||
* @returns {number|null} | ||
*/ | ||
get livePeriod() { | ||
return this._livePeriod | ||
} | ||
/** | ||
* | ||
@@ -55,3 +45,3 @@ * @param {Object} raw | ||
static deserialize(raw) { | ||
return new InputLocationMessageContent(raw['latitude'], raw['longitude'], raw['live_period'] ? raw['live_period'] : null) | ||
return new InputLocationMessageContent(raw['latitude'], raw['longitude']) | ||
} | ||
@@ -66,4 +56,3 @@ | ||
latitude: this.latitude ? this.latitude : undefined, | ||
longitude: this.longitude ? this.longitude : undefined, | ||
live_period: this.livePeriod ? this.livePeriod : undefined | ||
longitude: this.longitude ? this.longitude : undefined | ||
} | ||
@@ -70,0 +59,0 @@ } |
@@ -5,3 +5,3 @@ 'use strict' | ||
/** | ||
* Represents the content of a text message to be sent as the result of an inline query. | ||
* Represents the content of a text message to be sent as the result of an inline query. | ||
*/ | ||
@@ -8,0 +8,0 @@ |
@@ -5,3 +5,3 @@ 'use strict' | ||
/** | ||
* Represents the content of a venue message to be sent as the result of an inline query. | ||
* Represents the content of a venue message to be sent as the result of an inline query. | ||
*/ | ||
@@ -17,5 +17,4 @@ | ||
* @param {string|null} [foursquareId] | ||
* @param {string|null} [foursquareType] | ||
*/ | ||
constructor(latitude, longitude, title, address, foursquareId, foursquareType) { | ||
constructor(latitude, longitude, title, address, foursquareId) { | ||
super() | ||
@@ -27,3 +26,2 @@ this._latitude = latitude | ||
this._foursquareId = foursquareId | ||
this._foursquareType = foursquareType | ||
} | ||
@@ -72,10 +70,2 @@ | ||
/** | ||
* Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) | ||
* @returns {string|null} | ||
*/ | ||
get foursquareType() { | ||
return this._foursquareType | ||
} | ||
/** | ||
* | ||
@@ -91,4 +81,3 @@ * @param {Object} raw | ||
raw['address'], | ||
raw['foursquare_id'] ? raw['foursquare_id'] : null, | ||
raw['foursquare_type'] ? raw['foursquare_type'] : null | ||
raw['foursquare_id'] ? raw['foursquare_id'] : null | ||
) | ||
@@ -107,4 +96,3 @@ } | ||
address: this.address ? this.address : undefined, | ||
foursquare_id: this.foursquareId ? this.foursquareId : undefined, | ||
foursquare_type: this.foursquareType ? this.foursquareType : undefined | ||
foursquare_id: this.foursquareId ? this.foursquareId : undefined | ||
} | ||
@@ -111,0 +99,0 @@ } |
@@ -21,3 +21,3 @@ 'use strict' | ||
/** | ||
* Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed | ||
* Text of the button. If none of the optional fields are used, it will be sent to the bot as a message when the button is pressed | ||
* @returns {string} | ||
@@ -24,0 +24,0 @@ */ |
@@ -8,3 +8,2 @@ 'use strict' | ||
const Document = require('./Document') | ||
const Animation = require('./Animation') | ||
const Game = require('./Game') | ||
@@ -15,11 +14,5 @@ const PhotoSize = require('./PhotoSize') | ||
const Voice = require('./Voice') | ||
const VideoNote = require('./VideoNote') | ||
const Contact = require('./Contact') | ||
const Location = require('./Location') | ||
const Venue = require('./Venue') | ||
const Poll = require('./Poll') | ||
const Invoice = require('./Invoice') | ||
const SuccessfulPayment = require('./SuccessfulPayment') | ||
const PassportData = require('./PassportData') | ||
const InlineKeyboardMarkup = require('./InlineKeyboardMarkup') | ||
@@ -40,15 +33,9 @@ /** | ||
* @param {number|null} [forwardFromMessageId] | ||
* @param {string|null} [forwardSignature] | ||
* @param {string|null} [forwardSenderName] | ||
* @param {number|null} [forwardDate] | ||
* @param {Message|null} [replyToMessage] | ||
* @param {number|null} [editDate] | ||
* @param {string|null} [mediaGroupId] | ||
* @param {string|null} [authorSignature] | ||
* @param {string|null} [text] | ||
* @param {MessageEntity[]|null} [entities] | ||
* @param {MessageEntity[]|null} [captionEntities] | ||
* @param {Audio|null} [audio] | ||
* @param {Document|null} [document] | ||
* @param {Animation|null} [animation] | ||
* @param {Game|null} [game] | ||
@@ -59,3 +46,2 @@ * @param {PhotoSize[]|null} [photo] | ||
* @param {Voice|null} [voice] | ||
* @param {VideoNote|null} [videoNote] | ||
* @param {string|null} [caption] | ||
@@ -65,4 +51,3 @@ * @param {Contact|null} [contact] | ||
* @param {Venue|null} [venue] | ||
* @param {Poll|null} [poll] | ||
* @param {User[]|null} [newChatMembers] | ||
* @param {User|null} [newChatMember] | ||
* @param {User|null} [leftChatMember] | ||
@@ -78,7 +63,2 @@ * @param {string|null} [newChatTitle] | ||
* @param {Message|null} [pinnedMessage] | ||
* @param {Invoice|null} [invoice] | ||
* @param {SuccessfulPayment|null} [successfulPayment] | ||
* @param {string|null} [connectedWebsite] | ||
* @param {PassportData|null} [passportData] | ||
* @param {InlineKeyboardMarkup|null} [replyMarkup] | ||
*/ | ||
@@ -93,15 +73,9 @@ constructor( | ||
forwardFromMessageId, | ||
forwardSignature, | ||
forwardSenderName, | ||
forwardDate, | ||
replyToMessage, | ||
editDate, | ||
mediaGroupId, | ||
authorSignature, | ||
text, | ||
entities, | ||
captionEntities, | ||
audio, | ||
document, | ||
animation, | ||
game, | ||
@@ -112,3 +86,2 @@ photo, | ||
voice, | ||
videoNote, | ||
caption, | ||
@@ -118,4 +91,3 @@ contact, | ||
venue, | ||
poll, | ||
newChatMembers, | ||
newChatMember, | ||
leftChatMember, | ||
@@ -130,8 +102,3 @@ newChatTitle, | ||
migrateFromChatId, | ||
pinnedMessage, | ||
invoice, | ||
successfulPayment, | ||
connectedWebsite, | ||
passportData, | ||
replyMarkup | ||
pinnedMessage | ||
) { | ||
@@ -145,15 +112,9 @@ this._messageId = messageId | ||
this._forwardFromMessageId = forwardFromMessageId | ||
this._forwardSignature = forwardSignature | ||
this._forwardSenderName = forwardSenderName | ||
this._forwardDate = forwardDate | ||
this._replyToMessage = replyToMessage | ||
this._editDate = editDate | ||
this._mediaGroupId = mediaGroupId | ||
this._authorSignature = authorSignature | ||
this._text = text | ||
this._entities = entities | ||
this._captionEntities = captionEntities | ||
this._audio = audio | ||
this._document = document | ||
this._animation = animation | ||
this._game = game | ||
@@ -164,3 +125,2 @@ this._photo = photo | ||
this._voice = voice | ||
this._videoNote = videoNote | ||
this._caption = caption | ||
@@ -170,4 +130,3 @@ this._contact = contact | ||
this._venue = venue | ||
this._poll = poll | ||
this._newChatMembers = newChatMembers | ||
this._newChatMember = newChatMember | ||
this._leftChatMember = leftChatMember | ||
@@ -183,7 +142,2 @@ this._newChatTitle = newChatTitle | ||
this._pinnedMessage = pinnedMessage | ||
this._invoice = invoice | ||
this._successfulPayment = successfulPayment | ||
this._connectedWebsite = connectedWebsite | ||
this._passportData = passportData | ||
this._replyMarkup = replyMarkup | ||
} | ||
@@ -200,3 +154,3 @@ | ||
/** | ||
* Sender, empty for messages sent to channels | ||
* Sender, can be empty for messages sent to channels | ||
* @returns {User|null} | ||
@@ -233,3 +187,3 @@ */ | ||
/** | ||
* For messages forwarded from channels, information about the original channel | ||
* For messages forwarded from a channel, information about the original channel | ||
* @returns {Chat|null} | ||
@@ -242,3 +196,3 @@ */ | ||
/** | ||
* For messages forwarded from channels, identifier of the original message in the channel | ||
* For forwarded channel posts, identifier of the original message in the channel | ||
* @returns {number|null} | ||
@@ -251,18 +205,2 @@ */ | ||
/** | ||
* For messages forwarded from channels, signature of the post author if present | ||
* @returns {string|null} | ||
*/ | ||
get forwardSignature() { | ||
return this._forwardSignature | ||
} | ||
/** | ||
* Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages | ||
* @returns {string|null} | ||
*/ | ||
get forwardSenderName() { | ||
return this._forwardSenderName | ||
} | ||
/** | ||
* For forwarded messages, date the original message was sent in Unix time | ||
@@ -292,18 +230,2 @@ * @returns {number|null} | ||
/** | ||
* The unique identifier of a media message group this message belongs to | ||
* @returns {string|null} | ||
*/ | ||
get mediaGroupId() { | ||
return this._mediaGroupId | ||
} | ||
/** | ||
* Signature of the post author for messages in channels | ||
* @returns {string|null} | ||
*/ | ||
get authorSignature() { | ||
return this._authorSignature | ||
} | ||
/** | ||
* For text messages, the actual UTF-8 text of the message, 0-4096 characters. | ||
@@ -325,10 +247,2 @@ * @returns {string|null} | ||
/** | ||
* For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption | ||
* @returns {MessageEntity[]|null} | ||
*/ | ||
get captionEntities() { | ||
return this._captionEntities | ||
} | ||
/** | ||
* Message is an audio file, information about the file | ||
@@ -350,10 +264,2 @@ * @returns {Audio|null} | ||
/** | ||
* Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set | ||
* @returns {Animation|null} | ||
*/ | ||
get animation() { | ||
return this._animation | ||
} | ||
/** | ||
* Message is a game, information about the game. More about games » | ||
@@ -399,11 +305,3 @@ * @returns {Game|null} | ||
/** | ||
* Message is a video note, information about the video message | ||
* @returns {VideoNote|null} | ||
*/ | ||
get videoNote() { | ||
return this._videoNote | ||
} | ||
/** | ||
* Caption for the animation, audio, document, photo, video or voice, 0-1024 characters | ||
* Caption for the document, photo or video, 0-200 characters | ||
* @returns {string|null} | ||
@@ -440,18 +338,10 @@ */ | ||
/** | ||
* Message is a native poll, information about the poll | ||
* @returns {Poll|null} | ||
* A new member was added to the group, information about them (this member may be the bot itself) | ||
* @returns {User|null} | ||
*/ | ||
get poll() { | ||
return this._poll | ||
get newChatMember() { | ||
return this._newChatMember | ||
} | ||
/** | ||
* New members that were added to the group or supergroup and information about them (the bot itself may be one of these members) | ||
* @returns {User[]|null} | ||
*/ | ||
get newChatMembers() { | ||
return this._newChatMembers | ||
} | ||
/** | ||
* A member was removed from the group, information about them (this member may be the bot itself) | ||
@@ -513,3 +403,3 @@ * @returns {User|null} | ||
/** | ||
* The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. | ||
* The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. | ||
* @returns {number|null} | ||
@@ -522,3 +412,3 @@ */ | ||
/** | ||
* The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. | ||
* The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. | ||
* @returns {number|null} | ||
@@ -539,42 +429,2 @@ */ | ||
/** | ||
* Message is an invoice for a payment, information about the invoice. More about payments » | ||
* @returns {Invoice|null} | ||
*/ | ||
get invoice() { | ||
return this._invoice | ||
} | ||
/** | ||
* Message is a service message about a successful payment, information about the payment. More about payments » | ||
* @returns {SuccessfulPayment|null} | ||
*/ | ||
get successfulPayment() { | ||
return this._successfulPayment | ||
} | ||
/** | ||
* The domain name of the website on which the user has logged in. More about Telegram Login » | ||
* @returns {string|null} | ||
*/ | ||
get connectedWebsite() { | ||
return this._connectedWebsite | ||
} | ||
/** | ||
* Telegram Passport data | ||
* @returns {PassportData|null} | ||
*/ | ||
get passportData() { | ||
return this._passportData | ||
} | ||
/** | ||
* Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. | ||
* @returns {InlineKeyboardMarkup|null} | ||
*/ | ||
get replyMarkup() { | ||
return this._replyMarkup | ||
} | ||
/** | ||
* | ||
@@ -593,15 +443,9 @@ * @param {Object} raw | ||
raw['forward_from_message_id'] ? raw['forward_from_message_id'] : null, | ||
raw['forward_signature'] ? raw['forward_signature'] : null, | ||
raw['forward_sender_name'] ? raw['forward_sender_name'] : null, | ||
raw['forward_date'] ? raw['forward_date'] : null, | ||
raw['reply_to_message'] ? Message.deserialize(raw['reply_to_message']) : null, | ||
raw['edit_date'] ? raw['edit_date'] : null, | ||
raw['media_group_id'] ? raw['media_group_id'] : null, | ||
raw['author_signature'] ? raw['author_signature'] : null, | ||
raw['text'] ? raw['text'] : null, | ||
raw['entities'] ? raw['entities'].map(item => MessageEntity.deserialize(item)) : null, | ||
raw['caption_entities'] ? raw['caption_entities'].map(item => MessageEntity.deserialize(item)) : null, | ||
raw['audio'] ? Audio.deserialize(raw['audio']) : null, | ||
raw['document'] ? Document.deserialize(raw['document']) : null, | ||
raw['animation'] ? Animation.deserialize(raw['animation']) : null, | ||
raw['game'] ? Game.deserialize(raw['game']) : null, | ||
@@ -612,3 +456,2 @@ raw['photo'] ? raw['photo'].map(item => PhotoSize.deserialize(item)) : null, | ||
raw['voice'] ? Voice.deserialize(raw['voice']) : null, | ||
raw['video_note'] ? VideoNote.deserialize(raw['video_note']) : null, | ||
raw['caption'] ? raw['caption'] : null, | ||
@@ -618,4 +461,3 @@ raw['contact'] ? Contact.deserialize(raw['contact']) : null, | ||
raw['venue'] ? Venue.deserialize(raw['venue']) : null, | ||
raw['poll'] ? Poll.deserialize(raw['poll']) : null, | ||
raw['new_chat_members'] ? raw['new_chat_members'].map(item => User.deserialize(item)) : null, | ||
raw['new_chat_member'] ? User.deserialize(raw['new_chat_member']) : null, | ||
raw['left_chat_member'] ? User.deserialize(raw['left_chat_member']) : null, | ||
@@ -630,8 +472,3 @@ raw['new_chat_title'] ? raw['new_chat_title'] : null, | ||
raw['migrate_from_chat_id'] ? raw['migrate_from_chat_id'] : null, | ||
raw['pinned_message'] ? Message.deserialize(raw['pinned_message']) : null, | ||
raw['invoice'] ? Invoice.deserialize(raw['invoice']) : null, | ||
raw['successful_payment'] ? SuccessfulPayment.deserialize(raw['successful_payment']) : null, | ||
raw['connected_website'] ? raw['connected_website'] : null, | ||
raw['passport_data'] ? PassportData.deserialize(raw['passport_data']) : null, | ||
raw['reply_markup'] ? InlineKeyboardMarkup.deserialize(raw['reply_markup']) : null | ||
raw['pinned_message'] ? Message.deserialize(raw['pinned_message']) : null | ||
) | ||
@@ -653,15 +490,9 @@ } | ||
forward_from_message_id: this.forwardFromMessageId ? this.forwardFromMessageId : undefined, | ||
forward_signature: this.forwardSignature ? this.forwardSignature : undefined, | ||
forward_sender_name: this.forwardSenderName ? this.forwardSenderName : undefined, | ||
forward_date: this.forwardDate ? this.forwardDate : undefined, | ||
reply_to_message: this.replyToMessage ? this.replyToMessage.serialize() : undefined, | ||
edit_date: this.editDate ? this.editDate : undefined, | ||
media_group_id: this.mediaGroupId ? this.mediaGroupId : undefined, | ||
author_signature: this.authorSignature ? this.authorSignature : undefined, | ||
text: this.text ? this.text : undefined, | ||
entities: this.entities ? this.entities.map(item => item.serialize()) : undefined, | ||
caption_entities: this.captionEntities ? this.captionEntities.map(item => item.serialize()) : undefined, | ||
audio: this.audio ? this.audio.serialize() : undefined, | ||
document: this.document ? this.document.serialize() : undefined, | ||
animation: this.animation ? this.animation.serialize() : undefined, | ||
game: this.game ? this.game.serialize() : undefined, | ||
@@ -672,3 +503,2 @@ photo: this.photo ? this.photo.map(item => item.serialize()) : undefined, | ||
voice: this.voice ? this.voice.serialize() : undefined, | ||
video_note: this.videoNote ? this.videoNote.serialize() : undefined, | ||
caption: this.caption ? this.caption : undefined, | ||
@@ -678,4 +508,3 @@ contact: this.contact ? this.contact.serialize() : undefined, | ||
venue: this.venue ? this.venue.serialize() : undefined, | ||
poll: this.poll ? this.poll.serialize() : undefined, | ||
new_chat_members: this.newChatMembers ? this.newChatMembers.map(item => item.serialize()) : undefined, | ||
new_chat_member: this.newChatMember ? this.newChatMember.serialize() : undefined, | ||
left_chat_member: this.leftChatMember ? this.leftChatMember.serialize() : undefined, | ||
@@ -690,8 +519,3 @@ new_chat_title: this.newChatTitle ? this.newChatTitle : undefined, | ||
migrate_from_chat_id: this.migrateFromChatId ? this.migrateFromChatId : undefined, | ||
pinned_message: this.pinnedMessage ? this.pinnedMessage.serialize() : undefined, | ||
invoice: this.invoice ? this.invoice.serialize() : undefined, | ||
successful_payment: this.successfulPayment ? this.successfulPayment.serialize() : undefined, | ||
connected_website: this.connectedWebsite ? this.connectedWebsite : undefined, | ||
passport_data: this.passportData ? this.passportData.serialize() : undefined, | ||
reply_markup: this.replyMarkup ? this.replyMarkup.serialize() : undefined | ||
pinned_message: this.pinnedMessage ? this.pinnedMessage.serialize() : undefined | ||
} | ||
@@ -698,0 +522,0 @@ } |
@@ -6,3 +6,3 @@ 'use strict' | ||
/** | ||
* This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. | ||
* This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. | ||
*/ | ||
@@ -28,3 +28,3 @@ | ||
/** | ||
* Type of the entity. Can be mention (@username), hashtag, cashtag, bot_command, url, email, phone_number, bold (bold text), italic (italic text), code (monowidth string), pre (monowidth block), text_link (for clickable text URLs), text_mention (for users without usernames) | ||
* Type of the entity. Can be mention (@username), hashtag, bot_command, url, email, bold (bold text), italic (italic text), code (monowidth string), pre (monowidth block), text_link (for clickable text URLs), text_mention (for users without usernames) | ||
* @returns {string} | ||
@@ -31,0 +31,0 @@ */ |
@@ -11,11 +11,8 @@ module.exports = { | ||
Document: require('./Document'), | ||
Sticker: require('./Sticker'), | ||
Video: require('./Video'), | ||
Animation: require('./Animation'), | ||
Voice: require('./Voice'), | ||
VideoNote: require('./VideoNote'), | ||
Contact: require('./Contact'), | ||
Location: require('./Location'), | ||
Venue: require('./Venue'), | ||
PollOption: require('./PollOption'), | ||
Poll: require('./Poll'), | ||
UserProfilePhotos: require('./UserProfilePhotos'), | ||
@@ -30,13 +27,4 @@ File: require('./File'), | ||
ForceReply: require('./ForceReply'), | ||
ChatPhoto: require('./ChatPhoto'), | ||
ChatMember: require('./ChatMember'), | ||
ResponseParameters: require('./ResponseParameters'), | ||
InputMediaPhoto: require('./InputMediaPhoto'), | ||
InputMediaVideo: require('./InputMediaVideo'), | ||
InputMediaAnimation: require('./InputMediaAnimation'), | ||
InputMediaAudio: require('./InputMediaAudio'), | ||
InputMediaDocument: require('./InputMediaDocument'), | ||
Sticker: require('./Sticker'), | ||
StickerSet: require('./StickerSet'), | ||
MaskPosition: require('./MaskPosition'), | ||
InlineQuery: require('./InlineQuery'), | ||
@@ -68,24 +56,4 @@ InlineQueryResultArticle: require('./InlineQueryResultArticle'), | ||
ChosenInlineResult: require('./ChosenInlineResult'), | ||
LabeledPrice: require('./LabeledPrice'), | ||
Invoice: require('./Invoice'), | ||
ShippingAddress: require('./ShippingAddress'), | ||
OrderInfo: require('./OrderInfo'), | ||
ShippingOption: require('./ShippingOption'), | ||
SuccessfulPayment: require('./SuccessfulPayment'), | ||
ShippingQuery: require('./ShippingQuery'), | ||
PreCheckoutQuery: require('./PreCheckoutQuery'), | ||
PassportData: require('./PassportData'), | ||
PassportFile: require('./PassportFile'), | ||
EncryptedPassportElement: require('./EncryptedPassportElement'), | ||
EncryptedCredentials: require('./EncryptedCredentials'), | ||
PassportElementErrorDataField: require('./PassportElementErrorDataField'), | ||
PassportElementErrorFrontSide: require('./PassportElementErrorFrontSide'), | ||
PassportElementErrorReverseSide: require('./PassportElementErrorReverseSide'), | ||
PassportElementErrorSelfie: require('./PassportElementErrorSelfie'), | ||
PassportElementErrorFile: require('./PassportElementErrorFile'), | ||
PassportElementErrorFiles: require('./PassportElementErrorFiles'), | ||
PassportElementErrorTranslationFile: require('./PassportElementErrorTranslationFile'), | ||
PassportElementErrorTranslationFiles: require('./PassportElementErrorTranslationFiles'), | ||
PassportElementErrorUnspecified: require('./PassportElementErrorUnspecified'), | ||
Game: require('./Game'), | ||
Animation: require('./Animation'), | ||
GameHighScore: require('./GameHighScore'), | ||
@@ -92,0 +60,0 @@ InputMessageContent: require('./InputMessageContent'), |
'use strict' | ||
/** | ||
* Contains information about why a request was unsuccessful. | ||
* Contains information about why a request was unsuccessfull. | ||
*/ | ||
@@ -6,0 +6,0 @@ |
'use strict' | ||
const PhotoSize = require('./PhotoSize') | ||
const MaskPosition = require('./MaskPosition') | ||
@@ -18,16 +17,5 @@ /** | ||
* @param {string|null} [emoji] | ||
* @param {string|null} [setName] | ||
* @param {MaskPosition|null} [maskPosition] | ||
* @param {number|null} [fileSize] | ||
*/ | ||
constructor( | ||
fileId, | ||
width, | ||
height, | ||
thumb, | ||
emoji, | ||
setName, | ||
maskPosition, | ||
fileSize | ||
) { | ||
constructor(fileId, width, height, thumb, emoji, fileSize) { | ||
this._fileId = fileId | ||
@@ -38,4 +26,2 @@ this._width = width | ||
this._emoji = emoji | ||
this._setName = setName | ||
this._maskPosition = maskPosition | ||
this._fileSize = fileSize | ||
@@ -69,3 +55,3 @@ } | ||
/** | ||
* Sticker thumbnail in the .webp or .jpg format | ||
* Sticker thumbnail in .webp or .jpg format | ||
* @returns {PhotoSize|null} | ||
@@ -86,18 +72,2 @@ */ | ||
/** | ||
* Name of the sticker set to which the sticker belongs | ||
* @returns {string|null} | ||
*/ | ||
get setName() { | ||
return this._setName | ||
} | ||
/** | ||
* For mask stickers, the position where the mask should be placed | ||
* @returns {MaskPosition|null} | ||
*/ | ||
get maskPosition() { | ||
return this._maskPosition | ||
} | ||
/** | ||
* File size | ||
@@ -122,4 +92,2 @@ * @returns {number|null} | ||
raw['emoji'] ? raw['emoji'] : null, | ||
raw['set_name'] ? raw['set_name'] : null, | ||
raw['mask_position'] ? MaskPosition.deserialize(raw['mask_position']) : null, | ||
raw['file_size'] ? raw['file_size'] : null | ||
@@ -140,4 +108,2 @@ ) | ||
emoji: this.emoji ? this.emoji : undefined, | ||
set_name: this.setName ? this.setName : undefined, | ||
mask_position: this.maskPosition ? this.maskPosition.serialize() : undefined, | ||
file_size: this.fileSize ? this.fileSize : undefined | ||
@@ -144,0 +110,0 @@ } |
@@ -7,5 +7,2 @@ 'use strict' | ||
const CallbackQuery = require('./CallbackQuery') | ||
const ShippingQuery = require('./ShippingQuery') | ||
const PreCheckoutQuery = require('./PreCheckoutQuery') | ||
const Poll = require('./Poll') | ||
@@ -27,5 +24,2 @@ /** | ||
* @param {CallbackQuery|null} [callbackQuery] | ||
* @param {ShippingQuery|null} [shippingQuery] | ||
* @param {PreCheckoutQuery|null} [preCheckoutQuery] | ||
* @param {Poll|null} [poll] | ||
*/ | ||
@@ -40,6 +34,3 @@ constructor( | ||
chosenInlineResult, | ||
callbackQuery, | ||
shippingQuery, | ||
preCheckoutQuery, | ||
poll | ||
callbackQuery | ||
) { | ||
@@ -54,9 +45,6 @@ this._updateId = updateId | ||
this._callbackQuery = callbackQuery | ||
this._shippingQuery = shippingQuery | ||
this._preCheckoutQuery = preCheckoutQuery | ||
this._poll = poll | ||
} | ||
/** | ||
* The update‘s unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you’re using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially. | ||
* The update‘s unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you’re using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. | ||
* @returns {number} | ||
@@ -109,3 +97,3 @@ */ | ||
/** | ||
* The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot. | ||
* The result of an inline query that was chosen by a user and sent to their chat partner. | ||
* @returns {ChosenInlineResult|null} | ||
@@ -126,26 +114,2 @@ */ | ||
/** | ||
* New incoming shipping query. Only for invoices with flexible price | ||
* @returns {ShippingQuery|null} | ||
*/ | ||
get shippingQuery() { | ||
return this._shippingQuery | ||
} | ||
/** | ||
* New incoming pre-checkout query. Contains full information about checkout | ||
* @returns {PreCheckoutQuery|null} | ||
*/ | ||
get preCheckoutQuery() { | ||
return this._preCheckoutQuery | ||
} | ||
/** | ||
* New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot | ||
* @returns {Poll|null} | ||
*/ | ||
get poll() { | ||
return this._poll | ||
} | ||
/** | ||
* | ||
@@ -164,6 +128,3 @@ * @param {Object} raw | ||
raw['chosen_inline_result'] ? ChosenInlineResult.deserialize(raw['chosen_inline_result']) : null, | ||
raw['callback_query'] ? CallbackQuery.deserialize(raw['callback_query']) : null, | ||
raw['shipping_query'] ? ShippingQuery.deserialize(raw['shipping_query']) : null, | ||
raw['pre_checkout_query'] ? PreCheckoutQuery.deserialize(raw['pre_checkout_query']) : null, | ||
raw['poll'] ? Poll.deserialize(raw['poll']) : null | ||
raw['callback_query'] ? CallbackQuery.deserialize(raw['callback_query']) : null | ||
) | ||
@@ -185,6 +146,3 @@ } | ||
chosen_inline_result: this.chosenInlineResult ? this.chosenInlineResult.serialize() : undefined, | ||
callback_query: this.callbackQuery ? this.callbackQuery.serialize() : undefined, | ||
shipping_query: this.shippingQuery ? this.shippingQuery.serialize() : undefined, | ||
pre_checkout_query: this.preCheckoutQuery ? this.preCheckoutQuery.serialize() : undefined, | ||
poll: this.poll ? this.poll.serialize() : undefined | ||
callback_query: this.callbackQuery ? this.callbackQuery.serialize() : undefined | ||
} | ||
@@ -191,0 +149,0 @@ } |
@@ -11,15 +11,11 @@ 'use strict' | ||
* @param {number} id | ||
* @param {boolean} isBot | ||
* @param {string} firstName | ||
* @param {string|null} [lastName] | ||
* @param {string|null} [username] | ||
* @param {string|null} [languageCode] | ||
*/ | ||
constructor(id, isBot, firstName, lastName, username, languageCode) { | ||
constructor(id, firstName, lastName, username) { | ||
this._id = id | ||
this._isBot = isBot | ||
this._firstName = firstName | ||
this._lastName = lastName | ||
this._username = username | ||
this._languageCode = languageCode | ||
} | ||
@@ -36,10 +32,2 @@ | ||
/** | ||
* True, if this user is a bot | ||
* @returns {boolean} | ||
*/ | ||
get isBot() { | ||
return this._isBot | ||
} | ||
/** | ||
* User‘s or bot’s first name | ||
@@ -69,10 +57,2 @@ * @returns {string} | ||
/** | ||
* IETF language tag of the user's language | ||
* @returns {string|null} | ||
*/ | ||
get languageCode() { | ||
return this._languageCode | ||
} | ||
/** | ||
* | ||
@@ -83,10 +63,3 @@ * @param {Object} raw | ||
static deserialize(raw) { | ||
return new User( | ||
raw['id'], | ||
raw['is_bot'], | ||
raw['first_name'], | ||
raw['last_name'] ? raw['last_name'] : null, | ||
raw['username'] ? raw['username'] : null, | ||
raw['language_code'] ? raw['language_code'] : null | ||
) | ||
return new User(raw['id'], raw['first_name'], raw['last_name'] ? raw['last_name'] : null, raw['username'] ? raw['username'] : null) | ||
} | ||
@@ -101,7 +74,5 @@ | ||
id: this.id ? this.id : undefined, | ||
is_bot: this.isBot ? this.isBot : undefined, | ||
first_name: this.firstName ? this.firstName : undefined, | ||
last_name: this.lastName ? this.lastName : undefined, | ||
username: this.username ? this.username : undefined, | ||
language_code: this.languageCode ? this.languageCode : undefined | ||
username: this.username ? this.username : undefined | ||
} | ||
@@ -108,0 +79,0 @@ } |
@@ -16,5 +16,4 @@ 'use strict' | ||
* @param {string|null} [foursquareId] | ||
* @param {string|null} [foursquareType] | ||
*/ | ||
constructor(location, title, address, foursquareId, foursquareType) { | ||
constructor(location, title, address, foursquareId) { | ||
this._location = location | ||
@@ -24,3 +23,2 @@ this._title = title | ||
this._foursquareId = foursquareId | ||
this._foursquareType = foursquareType | ||
} | ||
@@ -61,10 +59,2 @@ | ||
/** | ||
* Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) | ||
* @returns {string|null} | ||
*/ | ||
get foursquareType() { | ||
return this._foursquareType | ||
} | ||
/** | ||
* | ||
@@ -75,9 +65,3 @@ * @param {Object} raw | ||
static deserialize(raw) { | ||
return new Venue( | ||
raw['location'] ? Location.deserialize(raw['location']) : null, | ||
raw['title'], | ||
raw['address'], | ||
raw['foursquare_id'] ? raw['foursquare_id'] : null, | ||
raw['foursquare_type'] ? raw['foursquare_type'] : null | ||
) | ||
return new Venue(raw['location'] ? Location.deserialize(raw['location']) : null, raw['title'], raw['address'], raw['foursquare_id'] ? raw['foursquare_id'] : null) | ||
} | ||
@@ -94,4 +78,3 @@ | ||
address: this.address ? this.address : undefined, | ||
foursquare_id: this.foursquareId ? this.foursquareId : undefined, | ||
foursquare_type: this.foursquareType ? this.foursquareType : undefined | ||
foursquare_id: this.foursquareId ? this.foursquareId : undefined | ||
} | ||
@@ -98,0 +81,0 @@ } |
{ | ||
"_from": "limber-api-node-telegram", | ||
"_id": "limber-api-node-telegram@1.0.2", | ||
"_id": "limber-api-node-telegram@1.0.3", | ||
"_inBundle": false, | ||
@@ -63,3 +63,3 @@ "_integrity": "sha1-H1Zay+iZJbASdlZgZpbYdhvqGQc=", | ||
}, | ||
"version": "1.0.2" | ||
"version": "1.0.3" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
333413
119
10821