* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Longman\TelegramBot\Entities;
use Longman\TelegramBot\Entities\ReactionType\Factory as ReactionTypeFactory;
use Longman\TelegramBot\Entities\ReactionType\ReactionType;
/**
* This object represents a chat.
*
* @link https://core.telegram.org/bots/api#chat
*
* @property string type Type of chat, can be either "private ", "group", "supergroup" or "channel"
*
* @method int getId() 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.
* @method string getType() Type of chat, can be either "private ", "group", "supergroup" or "channel"
* @method string getTitle() Optional. Title, for channels and group chats
* @method string getUsername() Optional. Username, for private chats, supergroups and channels if available
* @method string getFirstName() Optional. First name of the other party in a private chat
* @method string getLastName() Optional. Last name of the other party in a private chat
* @method bool getIsForum() Optional. True, if the supergroup chat is a forum (has topics enabled)
+ * @method bool getIsDirectMessages() Optional. True, if the chat is the direct messages chat of a channel
* @method int getAccentColorId() Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details.
* @method ChatPhoto getPhoto() Optional. Chat photo. Returned only in getChat.
* @method string[] getActiveUsernames() Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.
* @method ReactionType[] getAvailableReactions() Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. Returned only in getChat.
* @method string getBackgroundCustomEmojiId() Optional. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background
* @method int getProfileAccentColorId() Optional. Identifier of the accent color for the chat's profile background. See profile accent colors for more details.
* @method string getProfileBackgroundCustomEmojiId() Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background
* @method string getEmojiStatusCustomEmojiId() Optional. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat.
* @method int getEmojiStatusExpirationDate() Optional. Expiration date of the emoji status of the other party in a private chat in Unix time, if any. Returned only in getChat.
* @method string getBio() Optional. Bio of the other party in a private chat. Returned only in getChat.
* @method bool getHasPrivateForwards() Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user. Returned only in getChat.
* @method bool getHasRestrictedVoiceAndVideoMessages() Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.
* @method bool getJoinToSendMessages() Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.
* @method bool getJoinByRequest() Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.
* @method string getDescription() Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.
* @method string getInviteLink() Optional. Chat invite link, for groups, 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.
* @method Message getPinnedMessage() Optional. Pinned message, for groups, supergroups and channels. Returned only in getChat.
* @method ChatPermissions getPermissions() Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.
* @method int getSlowModeDelay() Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user. Returned only in getChat.
* @method int getUnrestrictBoostCount() Optional. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions.
* @method int getMessageAutoDeleteTime() Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.
* @method bool getHasAggressiveAntiSpamEnabled() Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.
* @method bool getHasHiddenMembers() Optional. True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat.
* @method bool getHasProtectedContent() Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.
* @method bool getHasVisibleHistory() Optional. True, if new chat members will have access to old messages; available only to chat administrators
* @method string getStickerSetName() Optional. For supergroups, name of group sticker set. Returned only in getChat.
* @method bool getCanSetStickerSet() Optional. True, if the bot can change the group sticker set. Returned only in getChat.
* @method string getCustomEmojiStickerSetName() Optional. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group.
* @method int getLinkedChatId() Optional. Unique identifier for the linked chat. Returned only in getChat.
* @method ChatLocation getLocation() Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.
+ * @method BusinessIntro getBusinessIntro() Optional. For private chats with business accounts, the intro of the business. Returned only in getChat.
+ * @method BusinessLocation getBusinessLocation() Optional. For private chats with business accounts, the location of the business. Returned only in getChat.
+ * @method BusinessOpeningHours getBusinessOpeningHours() Optional. For private chats with business accounts, the opening hours of the business. Returned only in getChat.
+ * @method Chat getPersonalChat() Optional. For private chats, the personal channel of the user. Returned only in getChat.
+ * @method Birthdate getBirthdate() Optional. For private chats with ordinary users, the user's birthdate. Returned only in getChat.
* Represents the rights of an administrator in a chat.
*
* @method bool getIsAnonymous() True, if the user's presence in the chat is hidden
* @method bool getCanManageChat() True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
* @method bool getCanDeleteMessages() True, if the administrator can delete messages of other users
* @method bool getCanManageVideoChats() True, if the administrator can manage video chats
* @method bool getCanRestrictMembers() True, if the administrator can restrict, ban or unban chat members
* @method bool getCanPromoteMembers() True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
* @method bool getCanChangeInfo() True, if the user is allowed to change the chat title, photo and other settings
* @method bool getCanInviteUsers() True, if the user is allowed to invite new users to the chat
* @method bool getCanPostMessages() Optional. True, if the administrator can post in the channel; channels only
* @method bool getCanEditMessages() Optional. True, if the administrator can edit messages of other users and can pin messages; channels only
* @method bool getCanPinMessages() Optional. True, if the user is allowed to pin messages; groups and supergroups only
* @method bool getCanPostStories() Optional. True, if the administrator can post stories in the channel; channels only
* @method bool getCanEditStories() Optional. True, if the administrator can edit stories posted by other users; channels only
* @method bool getCanDeleteStories() Optional. True, if the administrator can delete stories posted by other users; channels only
* @method bool getCanManageTopics() Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only
+ * @method bool getCanManageDirectMessages() Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only
+ * @method bool getCanManageTags() Optional. True, if the administrator can manage chat member tags; for groups and supergroups only
*
* @method $this setIsAnonymous(bool $is_anonymous) True, if the user's presence in the chat is hidden
* @method $this setCanManageChat(bool $can_manage_chat) True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
* @method $this setCanDeleteMessages(bool $can_delete_messages) True, if the administrator can delete messages of other users
* @method $this setCanManageVideoChats(bool $can_manage_video_chats) True, if the administrator can manage video chats
* @method $this setCanRestrictMembers(bool $can_restrict_members) True, if the administrator can restrict, ban or unban chat members
* @method $this setCanPromoteMembers(bool $can_promote_members) True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
* @method $this setCanChangeInfo(bool $can_change_info) True, if the user is allowed to change the chat title, photo and other settings
* @method $this setCanInviteUsers(bool $can_invite_users) True, if the user is allowed to invite new users to the chat
* @method $this setCanPostMessages(bool $can_post_messages) Optional. True, if the administrator can post in the channel; channels only
* @method $this setCanEditMessages(bool $can_edit_messages) Optional. True, if the administrator can edit messages of other users and can pin messages; channels only
* @method $this setCanPinMessages(bool $can_pin_messages) Optional. True, if the user is allowed to pin messages; groups and supergroups only
* @method $this setCanPostStories(bool $can_post_stories) Optional. True, if the administrator can post stories in the channel; channels only
* @method $this setCanEditStories(bool $can_edit_stories) Optional. True, if the administrator can edit stories posted by other users; channels only
* @method $this setCanDeleteStories(bool $can_delete_stories) Optional. True, if the administrator can delete stories posted by other users; channels only
* @method $this setCanManageTopics(bool $can_manage_topics) Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only
+ * @method $this setCanManageDirectMessages(bool $can_manage_direct_messages) Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only
+ * @method $this setCanManageTags(bool $can_manage_tags) Optional. True, if the administrator can manage chat member tags; for groups and supergroups only
* @method string getStatus() The member's status in the chat, always “administrator”
* @method User getUser() Information about the user
* @method bool getCanBeEdited() True, if the bot is allowed to edit administrator privileges of that user
* @method bool getIsAnonymous() True, if the user's presence in the chat is hidden
* @method bool getCanManageChat() True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
* @method bool getCanDeleteMessages() True, if the administrator can delete messages of other users
* @method bool getCanManageVideoChats() True, if the administrator can manage video chats
* @method bool getCanRestrictMembers() True, if the administrator can restrict, ban or unban chat members
* @method bool getCanPromoteMembers() True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
* @method bool getCanChangeInfo() True, if the user is allowed to change the chat title, photo and other settings
* @method bool getCanInviteUsers() True, if the user is allowed to invite new users to the chat
* @method bool getCanPostMessages() Optional. True, if the administrator can post in the channel; channels only
* @method bool getCanEditMessages() Optional. True, if the administrator can edit messages of other users and can pin messages; channels only
* @method bool getCanPinMessages() Optional. True, if the user is allowed to pin messages; groups and supergroups only
* @method bool getCanPostStories() Optional. True, if the administrator can post stories in the channel; channels only
* @method bool getCanEditStories() Optional. True, if the administrator can edit stories posted by other users; channels only
* @method bool getCanDeleteStories() Optional. True, if the administrator can delete stories posted by other users; channels only
* @method bool getCanManageTopics() Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only
+ * @method bool getCanManageDirectMessages() Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only
+ * @method bool getCanManageTags() Optional. True, if the administrator can manage chat member tags; for groups and supergroups only
* @method string getCustomTitle() Custom title for this user
+ * @method string getTag() Optional. Tag of the member
*/
class ChatMemberAdministrator extends Entity implements ChatMember
* @method User getFrom() Performer of the action, which resulted in the change
* @method int getDate() Date the change was done in Unix time
* @method ChatMember getOldChatMember() Previous information about the chat member
* @method ChatMember getNewChatMember() New information about the chat member
* @method ChatInviteLink getInviteLink() Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.
* @method bool getViaChatFolderInviteLink() Optional. True, if the user joined the chat via a chat folder invite link
+ * @method bool getViaJoinRequest() Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator
* @method bool getCanSendMessages() Optional. True, if the user is allowed to send text messages, contacts, locations and venues
* @method bool getCanSendAudios() Optional. True, if the user is allowed to send audios
* @method bool getCanSendDocuments() Optional. True, if the user is allowed to send documents
* @method bool getCanSendPhotos() Optional. True, if the user is allowed to send photos
* @method bool getCanSendVideos() Optional. True, if the user is allowed to send videos
* @method bool getCanSendVideoNotes() Optional. True, if the user is allowed to send video notes
* @method bool getCanSendVoiceNotes() Optional. True, if the user is allowed to send voice notes
* @method bool getCanSendPolls() Optional. True, if the user is allowed to send polls, implies can_send_messages
* @method bool getCanSendOtherMessages() Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages
* @method bool getCanAddWebPagePreviews() Optional. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages
* @method bool getCanChangeInfo() Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups
* @method bool getCanInviteUsers() Optional. True, if the user is allowed to invite new users to the chat
* @method bool getCanPinMessages() Optional. True, if the user is allowed to pin messages. Ignored in public supergroups
* @method bool getCanManageTopics() Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages
+ * @method bool getCanEditTag() Optional. True, if the user is allowed to edit their own tag
+ * @method bool getCanReactToMessages() Optional. True, if the user is allowed to add reactions to messages
*/
class ChatPermissions extends Entity
{
/**
* True, if the user is allowed to send audios, documents, photos, videos, video notes OR voice notes
*
* @deprecated Use new fine-grained methods provided by Telegram Bot API.
- * @method int getRequestId() Identifier of the request
- * @method int getChatId() Identifier of the shared chat.
+ * @method int getRequestId() Identifier of the request
+ * @method int getChatId() Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.
+ * @method string getTitle() Optional. Title of the chat, if the title was requested by the bot
+ * @method string getUsername() Optional. Username of the chat, if the username was requested by the bot
+ * @method PhotoSize[] getPhoto() Optional. Available sizes of the chat photo, if the photo was requested by the bot
* @method MessageOrigin getOrigin() Origin of the message replied to by the given message
* @method Chat getChat() Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a channel.
* @method int getMessageId() Optional. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.
* @method LinkPreviewOptions getLinkPreviewOptions() Optional. Options used for link preview generation for the original message, if it is a text message
* @method Animation getAnimation() Optional. Message is an animation, information about the animation
* @method Audio getAudio() Optional. Message is an audio file, information about the file
* @method Document getDocument() Optional. Message is a general file, information about the file
* @method PhotoSize[] getPhoto() Optional. Message is a photo, available sizes of the photo
* @method Sticker getSticker() Optional. Message is a sticker, information about the sticker
* @method Story getStory() Optional. Message is a forwarded story
* @method Video getVideo() Optional. Message is a video, information about the video
* @method VideoNote getVideoNote() Optional. Message is a video note, information about the video message
* @method Voice getVoice() Optional. Message is a voice message, information about the file
* @method bool getHasMediaSpoiler() Optional. True, if the message media is covered by a spoiler animation
+ * @method Checklist getChecklist() Optional. Message is a checklist
* @method Contact getContact() Optional. Message is a shared contact, information about the contact
* @method Dice getDice() Optional. Message is a dice with random value
* @method Game getGame() Optional. Message is a game, information about the game. More about games »
* @method Giveaway getGiveaway() Optional. Message is a scheduled giveaway, information about the giveaway
* @method GiveawayWinners getGiveawayWinners() Optional. A giveaway with public winners was completed
* @method Invoice getInvoice() Optional. Message is an invoice for a payment, information about the invoice. More about payments »
+ * @method LivePhoto getLivePhoto() Optional. Message is a live photo, information about the live photo
* @method Location getLocation() Optional. Message is a shared location, information about the location
* @method Poll getPoll() Optional. Message is a native poll, information about the poll
* @method Venue getVenue() Optional. Message is a venue, information about the venue
+ * @method PaidMediaInfo getPaidMedia() Optional. Message is a paid media purchase, information about the paid media
- * @method string getText() Label text on the button
- * @method string getUrl() Optional. HTTP url to be opened when button is pressed
- * @method LoginUrl getLoginUrl() Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.
- * @method string getCallbackData() Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
- * @method WebAppInfo getWebApp() Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot.
- * @method string getSwitchInlineQuery() Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot’s username will be inserted.
- * @method string getSwitchInlineQueryCurrentChat() Optional. If set, pressing the button will insert the bot‘s username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot’s username will be inserted.
+ * @method string getText() Label text on the button
+ * @method string getUrl() Optional. HTTP url to be opened when button is pressed
+ * @method LoginUrl getLoginUrl() Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.
+ * @method string getCallbackData() Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
+ * @method WebAppInfo getWebApp() Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot.
+ * @method string getSwitchInlineQuery() Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot’s username will be inserted.
+ * @method string getSwitchInlineQueryCurrentChat() Optional. If set, pressing the button will insert the bot‘s username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot’s username will be inserted.
* @method SwitchInlineQueryChosenChat getSwitchInlineQueryChosenChat() Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field
- * @method CallbackGame getCallbackGame() Optional. Description of the game that will be launched when the user presses the button.
- * @method bool getPay() Optional. Specify True, to send a Pay button.
+ * @method CallbackGame getCallbackGame() Optional. Description of the game that will be launched when the user presses the button.
+ * @method bool getPay() Optional. Specify True, to send a Pay button.
+ * @method CopyTextButton getCopyText() Optional. Description of the button that copies the specified text to the clipboard.
+ * @method string getStyle() Optional. Style of the button. Must be one of “danger” (red), “success” (green) or “primary” (blue). If omitted, then an app-specific style is used.
+ * @method string getIconCustomEmojiId() Optional. Unique identifier of the custom emoji shown as the button icon.
*
* @method $this setText(string $text) Label text on the button
* @method $this setUrl(string $url) Optional. HTTP url to be opened when button is pressed
* @method $this setLoginUrl(LoginUrl $login_url) Optional. HTTP url to be opened when button is pressed
* @method $this setCallbackData(string $callback_data) Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
* @method $this setWebApp(WebAppInfo $web_app) Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot.
* @method $this setSwitchInlineQuery(string $switch_inline_query) Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot’s username will be inserted.
* @method $this setSwitchInlineQueryCurrentChat(string $switch_inline_query_current_chat) Optional. If set, pressing the button will insert the bot‘s username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot’s username will be inserted.
* @method $this setSwitchInlineQueryChosenChat(SwitchInlineQueryChosenChat $switch_inline_query_chosen_chat) Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field
* @method $this setCallbackGame(CallbackGame $callback_game) Optional. Description of the game that will be launched when the user presses the button.
* @method $this setPay(bool $pay) Optional. Specify True, to send a Pay button.
+ * @method $this setCopyText(CopyTextButton $copy_text) Optional. Description of the button that copies the specified text to the clipboard.
+ * @method $this setStyle(string $style) Optional. Style of the button. Must be one of “danger” (red), “success” (green) or “primary” (blue). If omitted, then an app-specific style is used.
+ * @method $this setIconCustomEmojiId(string $icon_custom_emoji_id) Optional. Unique identifier of the custom emoji shown as the button icon.
- * @method string getType() Type of the result, must be animation
- * @method string getMedia() File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »
- * @method string getThumbnail() Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
- * @method string getCaption() Optional. Caption of the animation to be sent, 0-200 characters
- * @method string getParseMode() Optional. Mode for parsing entities in the animation caption
- * @method MessageEntity[] getCaptionEntities() Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- * @method int getWidth() Optional. Animation width
- * @method int getHeight() Optional. Animation height
- * @method int getDuration() Optional. Animation duration
- * @method bool getHasSpoiler() Optional. Pass True if the animation needs to be covered with a spoiler animation
+ * @method string getType() Type of the result, must be animation
+ * @method string getMedia() File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »
+ * @method string getThumbnail() Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
+ * @method string getCaption() Optional. Caption of the animation to be sent, 0-200 characters
+ * @method string getParseMode() Optional. Mode for parsing entities in the animation caption
+ * @method MessageEntity[] getCaptionEntities() Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
+ * @method bool getShowCaptionAboveMedia() Optional. True, if the caption must be shown above the message media
+ * @method int getWidth() Optional. Animation width
+ * @method int getHeight() Optional. Video height
+ * @method int getDuration() Optional. Animation duration
+ * @method bool getHasSpoiler() Optional. Pass True if the animation needs to be covered with a spoiler animation
*
* @method $this setMedia(string $media) File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »
- * @method $this setThumbnail(string $thumbnail) Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
+ * @method $this setThumbnail(string $thumbnail) Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
* @method $this setCaption(string $caption) Optional. Caption of the animation to be sent, 0-200 characters
* @method $this setParseMode(string $parse_mode) Optional. Mode for parsing entities in the animation caption
* @method $this setCaptionEntities(array $caption_entities) Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
+ * @method $this setShowCaptionAboveMedia(bool $show_caption_above_media) Optional. True, if the caption must be shown above the message media
* @method string getType() Type of the result, must be audio
* @method string getMedia() File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
- * @method string getThumbnail() Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
+ * @method string getThumbnail() Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
* @method string getCaption() Optional. Caption of the audio to be sent, 0-200 characters
* @method string getParseMode() Optional. Mode for parsing entities in the audio caption
* @method MessageEntity[] getCaptionEntities() Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
* @method int getDuration() Optional. Duration of the audio in seconds
* @method string getPerformer() Optional. Performer of the audio
* @method string getTitle() Optional. Title of the audio
*
* @method $this setMedia(string $media) File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
- * @method $this setThumbnail(string $thumbnail) Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
+ * @method $this setThumbnail(string $thumbnail) Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
* @method $this setCaption(string $caption) Optional. Caption of the audio to be sent, 0-200 characters
* @method $this setParseMode(string $parse_mode) Optional. Mode for parsing entities in the audio caption
* @method $this setCaptionEntities(array $caption_entities) Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
* @method $this setDuration(int $duration) Optional. Duration of the audio in seconds
* @method $this setPerformer(string $performer) Optional. Performer of the audio
* @method $this setTitle(string $title) Optional. Title of the audio
*/
class InputMediaAudio extends Entity implements InputMedia
* @method string getType() Type of the result, must be document
* @method string getMedia() File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
- * @method string getThumbnail() Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
+ * @method string getThumbnail() Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
* @method string getCaption() Optional. Caption of the document to be sent, 0-200 characters
* @method string getParseMode() Optional. Mode for parsing entities in the document caption
* @method MessageEntity[] getCaptionEntities() Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
* @method bool getDisableContentTypeDetection() Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always true, if the document is sent as part of an album.
*
* @method $this setMedia(string $media) File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
- * @method $this setThumbnail(string $thumbnail) Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
+ * @method $this setThumbnail(string $thumbnail) Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
* @method $this setCaption(string $caption) Optional. Caption of the document to be sent, 0-200 characters
* @method $this setParseMode(string $parse_mode) Optional. Mode for parsing entities in the document caption
* @method $this setCaptionEntities(array $caption_entities) Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
* @method $this setDisableContentTypeDetection(bool $disable_content_type_detection) Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always true, if the document is sent as part of an album.
*/
class InputMediaDocument extends Entity implements InputMedia
- * @method string getType() Type of the result, must be photo
- * @method string getMedia() File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
- * @method string getCaption() Optional. Caption of the photo to be sent, 0-200 characters
- * @method string getParseMode() Optional. Mode for parsing entities in the photo caption
- * @method MessageEntity[] getCaptionEntities() Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- * @method bool getHasSpoiler() Optional. Pass True if the photo needs to be covered with a spoiler animation
+ * @method string getType() Type of the result, must be photo
+ * @method string getMedia() File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
+ * @method string getCaption() Optional. Caption of the photo to be sent, 0-200 characters
+ * @method string getParseMode() Optional. Mode for parsing entities in the photo caption
+ * @method MessageEntity[] getCaptionEntities() Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
+ * @method bool getShowCaptionAboveMedia() Optional. True, if the caption must be shown above the message media
+ * @method bool getHasSpoiler() Optional. Pass True if the photo needs to be covered with a spoiler animation
*
* @method $this setMedia(string $media) File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
* @method $this setCaption(string $caption) Optional. Caption of the photo to be sent, 0-200 characters
* @method $this setParseMode(string $parse_mode) Optional. Mode for parsing entities in the photo caption
* @method $this setCaptionEntities(array $caption_entities) Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
+ * @method $this setShowCaptionAboveMedia(bool $show_caption_above_media) Optional. True, if the caption must be shown above the message media
* @method $this setHasSpoiler(bool $has_spoiler) Optional. Pass True if the photo needs to be covered with a spoiler animation
*/
class InputMediaPhoto extends Entity implements InputMedia
- * @method string getType() Type of the result, must be video
- * @method string getMedia() File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
- * @method string getThumbnail() Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
- * @method string getCaption() Optional. Caption of the video to be sent, 0-200 characters
- * @method string getParseMode() Optional. Mode for parsing entities in the video caption
- * @method MessageEntity[] getCaptionEntities() Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- * @method int getWidth() Optional. Video width
- * @method int getHeight() Optional. Video height
- * @method int getDuration() Optional. Video duration
- * @method bool getSupportsStreaming() Optional. Pass True, if the uploaded video is suitable for streaming
- * @method bool getHasSpoiler() Optional. Pass True if the video needs to be covered with a spoiler animation
+ * @method string getType() Type of the result, must be video
+ * @method string getMedia() File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
+ * @method string getThumbnail() Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
+ * @method string getCaption() Optional. Caption of the video to be sent, 0-200 characters
+ * @method string getParseMode() Optional. Mode for parsing entities in the video caption
+ * @method MessageEntity[] getCaptionEntities() Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
+ * @method bool getShowCaptionAboveMedia() Optional. True, if the caption must be shown above the message media
+ * @method int getWidth() Optional. Video width
+ * @method int getHeight() Optional. Video height
+ * @method int getDuration() Optional. Video duration
+ * @method bool getSupportsStreaming() Optional. Pass True, if the uploaded video is suitable for streaming
+ * @method bool getHasSpoiler() Optional. Pass True if the video needs to be covered with a spoiler animation
+ * @method string getCover() Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
+ * @method int getStartTimestamp() Optional. Timestamp in seconds from which the video will play in the message
*
* @method $this setMedia(string $media) File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
- * @method $this setThumbnail(string $thumbnail) Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
+ * @method $this setThumbnail(string $thumbnail) Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
* @method $this setCaption(string $caption) Optional. Caption of the video to be sent, 0-200 characters
* @method $this setParseMode(string $parse_mode) Optional. Mode for parsing entities in the video caption
* @method $this setCaptionEntities(array $caption_entities) Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
+ * @method $this setShowCaptionAboveMedia(bool $show_caption_above_media) Optional. True, if the caption must be shown above the message media
* @method $this setWidth(int $width) Optional. Video width
* @method $this setHeight(int $height) Optional. Video height
* @method $this setDuration(int $duration) Optional. Video duration
* @method $this setSupportsStreaming(bool $supports_streaming) Optional. Pass True, if the uploaded video is suitable for streaming
* @method $this setHasSpoiler(bool $has_spoiler) Optional. Pass True if the video needs to be covered with a spoiler animation
+ * @method $this setCover(string $cover) Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
+ * @method $this setStartTimestamp(int $start_timestamp) Optional. Timestamp in seconds from which the video will play in the message
*/
class InputMediaVideo extends Entity implements InputMedia
* @method string getSticker() The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, upload a new one using multipart/form-data, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files »
* @method string[] getEmojiList() List of 1-20 emoji associated with the sticker
* @method MaskPosition getMaskPosition() Optional. Position where the mask should be placed on faces. For “mask” stickers only.
* @method string[] getKeywords() Optional. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For “regular” and “custom_emoji” stickers only.
+ * @method string getFormat() Format of the sticker, must be one of “static”, “animated”, “video”
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Longman\TelegramBot\Entities;
/**
* Class KeyboardButton
*
* This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields request_contact, request_location, and request_poll are mutually exclusive.
* @method string getText() 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
* @method KeyboardButtonRequestUsers getRequestUsers() Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only.
* @method KeyboardButtonRequestChat getRequestChat() Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only.
* @method bool getRequestContact() Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only
* @method bool getRequestLocation() Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only
* @method KeyboardButtonPollType getRequestPoll() Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only
* @method WebAppInfo getWebApp() Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a “web_app_data” service message. Available in private chats only.
+ * @method string getStyle() Optional. Style of the button. Must be one of “danger” (red), “success” (green) or “primary” (blue). If omitted, then an app-specific style is used.
+ * @method string getIconCustomEmojiId() Optional. Unique identifier of the custom emoji shown as the button icon.
*
* @method $this setText(string $text) 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
* @method $this setRequestUsers(KeyboardButtonRequestUsers $request_users) Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only.
* @method $this setRequestChat(KeyboardButtonRequestChat $request_chat) Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only.
+ * @method $this setRequestManagedBot(KeyboardButtonRequestManagedBot $request_managed_bot) Optional. If specified, pressing the button will prompt the user to create and send a managed bot to the given bot.
* @method $this setRequestContact(bool $request_contact) Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only
* @method $this setRequestLocation(bool $request_location) Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only
* @method $this setRequestPoll(KeyboardButtonPollType $request_poll) Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only
* @method $this setWebApp(WebAppInfo $web_app) Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a “web_app_data” service message. Available in private chats only.
+ * @method $this setStyle(string $style) Optional. Style of the button. Must be one of “danger” (red), “success” (green) or “primary” (blue). If omitted, then an app-specific style is used.
+ * @method $this setIconCustomEmojiId(string $icon_custom_emoji_id) Optional. Unique identifier of the custom emoji shown as the button icon.
* This entity defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed.
* @method int getRequestId() Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message
* @method bool getChatIsChannel() Pass True to request a channel chat, pass False to request a group or a supergroup chat.
* @method bool getChatIsForum() Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.
* @method bool getChatHasUsername() Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.
* @method bool getChatIsCreated() Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.
* @method ChatAdministratorRights getUserAdministratorRights() Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.
* @method ChatAdministratorRights getBotAdministratorRights() Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.
* @method bool getBotIsMember() Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.
+ * @method bool getRequestTitle() Optional. Pass True to request the chat's title
+ * @method bool getRequestUsername() Optional. Pass True to request the chat's username
+ * @method bool getRequestPhoto() Optional. Pass True to request the chat's photo
*
* @method $this setRequestId(int $request_id) Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message
* @method $this setChatIsChannel(bool $chat_is_channel) Pass True to request a channel chat, pass False to request a group or a supergroup chat.
* @method $this setChatIsForum(bool $chat_is_forum) Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.
* @method $this setChatHasUsername(bool $chat_has_username) Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.
* @method $this setChatIsCreated(bool $chat_is_created) Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.
* @method $this setUserAdministratorRights(ChatAdministratorRights $user_administrator_rights) Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.
* @method $this setBotAdministratorRights(ChatAdministratorRights $bot_administrator_rights) Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.
* @method $this setBotIsMember(bool $bot_is_member) Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.
+ * @method $this setRequestTitle(bool $request_title) Optional. Pass True to request the chat's title
+ * @method $this setRequestUsername(bool $request_username) Optional. Pass True to request the chat's username
+ * @method $this setRequestPhoto(bool $request_photo) Optional. Pass True to request the chat's photo
* This object defines the criteria used to request suitable users. The identifiers of the selected users will be shared with the bot when the corresponding button is pressed.
- * @method int getRequestId() Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message
- * @method bool getUserIsBot() Optional. Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.
- * @method bool getUserIsPremium() Optional. Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied.
- * @method int getMaxQuantity() Optional. The maximum number of users to be selected; 1-10. Defaults to 1.
+ * @method int getRequestId() Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message
+ * @method bool getUserIsBot() Optional. Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.
+ * @method bool getUserIsPremium() Optional. Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied.
+ * @method int getMaxQuantity() Optional. The maximum number of users to be selected; 1-10. Defaults to 1.
+ * @method bool getRequestName() Optional. Pass True to request the users' first and last names
+ * @method bool getRequestUsername() Optional. Pass True to request the users' usernames
+ * @method bool getRequestPhoto() Optional. Pass True to request the users' photos
*
- * @method $this setRequestId(int $request_id) Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message
- * @method $this setUserIsBot(bool $user_is_bot) Optional. Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.
- * @method $this setUserIsPremium(bool $user_is_premium) Optional. Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied.
- * @method int setMaxQuantity(int $set_max_quantity) Optional. The maximum number of users to be selected; 1-10. Defaults to 1.
+ * @method $this setRequestId(int $request_id) Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message
+ * @method $this setUserIsBot(bool $user_is_bot) Optional. Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.
+ * @method $this setUserIsPremium(bool $user_is_premium) Optional. Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied.
+ * @method $this setMaxQuantity(int $set_max_quantity) Optional. The maximum number of users to be selected; 1-10. Defaults to 1.
+ * @method $this setRequestName(bool $request_name) Optional. Pass True to request the users' first and last names
+ * @method $this setRequestUsername(bool $request_username) Optional. Pass True to request the users' usernames
+ * @method $this setRequestPhoto(bool $request_photo) Optional. Pass True to request the users' photos
* @method bool getIsDisabled() Optional. True, if the link preview is disabled
* @method string getUrl() Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used
* @method bool getPreferSmallMedia() Optional. True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview
* @method bool getPreferLargeMedia() Optional. True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview
- * @method bool getShowAboveText() Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text *
+ * @method bool getShowAboveText() Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text
* @method int getMessageId() Unique message identifier
- * @method int getMessageThreadId() Optional. Unique identifier of a message thread to which the message belongs; for supergroups only
+ * @method int getMessageThreadId() Optional. Unique identifier of a message thread to which the message belongs; for supergroups and private chats with topic mode enabled only
+ * @method DirectMessagesTopic getDirectMessagesTopic() Optional. Information about the direct messages chat topic that contains the message
* @method User getFrom() Optional. Sender, can be empty for messages sent to channels
* @method Chat getSenderChat() Optional. Sender of the message, sent on behalf of a chat. The channel itself for channel messages. The supergroup itself for messages from anonymous group administrators. The linked channel for messages automatically forwarded to the discussion group
* @method int getSenderBoostCount() Optional. If the sender of the message boosted the chat, the number of boosts added by the user
+ * @method string getSenderTag() Optional. Tag or custom title of the sender of the message; for supergroups only
* @method int getDate() Date the message was sent in Unix time
* @method Chat getChat() Conversation the message belongs to
* @method MessageOrigin getForwardOrigin() Optional. Information about the original message for forwarded messages
- * @method bool getIsTopicMessage() Optional. True, if the message is sent to a forum topic
+ * @method bool getIsTopicMessage() Optional. True, if the message is sent to a forum topic or a private chat with topic mode enabled
+ * @method GiftInfo getGiftUpgradeSent() Optional. Service message: upgrade of a gift was purchased after the gift was sent
* @method bool getIsAutomaticForward() Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group
* @method ReplyToMessage getReplyToMessage() Optional. For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.
* @method ExternalReplyInfo getExternalReply() Optional. Information about the message that is being replied to, which may come from another chat or forum topic
* @method TextQuote getQuote() Optional. For replies that quote part of the original message, the quoted part of the message
* @method Story getReplyToStory() Optional. For replies to a story, the original story
+ * @method int getReplyToChecklistTaskId() Optional. Identifier of the specific checklist task that is being replied to
* @method User getViaBot() Optional. Bot through which the message was sent
* @method int getEditDate() Optional. Date the message was last edited in Unix time
* @method bool getHasProtectedContent() Optional. True, if the message can't be forwarded
+ * @method SuggestedPostInfo getSuggestedPostInfo() Optional. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited.
* @method string getMediaGroupId() Optional. The unique identifier of a media message group this message belongs to
* @method string getAuthorSignature() Optional. Signature of the post author for messages in channels
* @method LinkPreviewOptions getLinkPreviewOptions() Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed
* @method MessageEntity[] getEntities() Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text
* @method MessageEntity[] getCaptionEntities() Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
* @method Audio getAudio() Optional. Message is an audio file, information about the file
* @method Document getDocument() Optional. Message is a general file, information about the file
* @method Animation getAnimation() Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set
* @method Game getGame() Optional. Message is a game, information about the game.
* @method PhotoSize[] getPhoto() Optional. Message is a photo, available sizes of the photo
* @method Sticker getSticker() Optional. Message is a sticker, information about the sticker
* @method Story getStory() Optional. Message is a forwarded story
* @method Video getVideo() Optional. Message is a video, information about the video
* @method Voice getVoice() Optional. Message is a voice message, information about the file
* @method VideoNote getVideoNote() Optional. Message is a video note message, information about the video
* @method string getCaption() Optional. Caption for the document, photo or video, 0-200 characters
* @method bool getHasMediaSpoiler() Optional. True, if the message media is covered by a spoiler animation
+ * @method bool getShowCaptionAboveMedia() Optional. True, if the caption must be shown above the message media
+ * @method Checklist getChecklist() Optional. Message is a checklist
* @method Contact getContact() Optional. Message is a shared contact, information about the contact
* @method Location getLocation() Optional. Message is a shared location, information about the location
* @method Venue getVenue() Optional. Message is a venue, information about the venue
* @method Poll getPoll() Optional. Message is a native poll, information about the poll
* @method Dice getDice() Optional. Message is a dice with random value, 1-6 for “🎲” and “🎯” base emoji, 1-5 for “🏀” and “⚽” base emoji, 1-64 for “🎰” base emoji
* @method User[] getNewChatMembers() Optional. A new member(s) was added to the group, information about them (one of this members may be the bot itself)
* @method User getLeftChatMember() Optional. A member was removed from the group, information about them (this member may be the bot itself)
* @method string getNewChatTitle() Optional. A chat title was changed to this value
* @method PhotoSize[] getNewChatPhoto() Optional. A chat photo was changed to this value
* @method MessageAutoDeleteTimerChanged getMessageAutoDeleteTimerChanged() Optional. Service message: auto-delete timer settings changed in the chat
* @method bool getDeleteChatPhoto() Optional. Service message: the chat photo was deleted
* @method bool getGroupChatCreated() Optional. Service message: the group has been created
* @method bool getSupergroupChatCreated() Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can’t be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.
* @method bool getChannelChatCreated() Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can’t be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.
* @method int getMigrateToChatId() Optional. 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.
* @method int getMigrateFromChatId() Optional. 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.
* @method MaybeInaccessibleMessage getPinnedMessage() Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.
* @method Invoice getInvoice() Optional. Message is an invoice for a payment, information about the invoice.
* @method SuccessfulPayment getSuccessfulPayment() Optional. Message is a service message about a successful payment, information about the payment.
* @method UsersShared getUsersShared() Optional. Service message: users were shared with the bot
* @method ChatShared getChatShared() Optional. Service message: a chat was shared with the bot
* @method string getConnectedWebsite() Optional. The domain name of the website on which the user has logged in.
* @method WriteAccessAllowed getWriteAccessAllowed() Optional. Service message: the user allowed the bot added to the attachment menu to write messages
* @method PassportData getPassportData() Optional. Telegram Passport data
* @method ProximityAlertTriggered getProximityAlertTriggered() Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.
* @method ChatBoostAdded getBoostAdded() Optional. Service message: user boosted the chat
* @method ForumTopicCreated getForumTopicCreated() Optional. Service message: forum topic created
* @method ForumTopicEdited getForumTopicEdited() Optional. Service message: forum topic edited
* @method ForumTopicClosed getForumTopicClosed() Optional. Service message: forum topic closed
* @method ForumTopicReopened getForumTopicReopened() Optional. Service message: forum topic reopened
* @method GeneralForumTopicHidden getGeneralForumTopicHidden() Optional. Service message: the 'General' forum topic hidden
* @method GeneralForumTopicUnhidden getGeneralForumTopicUnhidden() Optional. Service message: the 'General' forum topic unhidden
* @method GiveawayCreated getGiveawayCreated() Optional. Service message: a scheduled giveaway was created
* @method Giveaway getGiveaway() Optional. The message is a scheduled giveaway message
* @method GiveawayWinners getGiveawayWinners() Optional. A giveaway with public winners was completed
* @method GiveawayCompleted getGiveawayCompleted() Optional. Service message: a giveaway without public winners was completed
* @method VideoChatScheduled getVideoChatScheduled() Optional. Service message: voice chat scheduled
* @method VideoChatStarted getVideoChatStarted() Optional. Service message: voice chat started
* @method VideoChatEnded getVideoChatEnded() Optional. Service message: voice chat ended
* @method VideoChatParticipantsInvited getVideoChatParticipantsInvited() Optional. Service message: new participants invited to a voice chat
* @method WebAppData getWebAppData() Optional. Service message: data sent by a Web App
* @method InlineKeyboard getReplyMarkup() Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
+ * @method string getBusinessConnectionId() Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message is business_message.
+ * @method User getSenderBusinessBot() Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the business account.
+ * @method bool getIsFromOffline() Optional. True, if the message was sent by an offline user. Applicable to messages sent by the bot on behalf of a user to a fellow user in a private chat.
+ * @method ChatBackground getChatBackgroundSet() Optional. Service message: chat background set
+ * @method ChecklistTasksDone getChecklistTasksDone() Optional. Service message: some tasks in a checklist were marked as done or not done
+ * @method ChecklistTasksAdded getChecklistTasksAdded() Optional. Service message: tasks were added to a checklist
+ * @method DirectMessagePriceChanged getDirectMessagePriceChanged() Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed
+ * @method string getMessageEffectId() Optional. Unique identifier of the message effect added to the message
+ * @method ChatOwnerLeft getChatOwnerLeft() Optional. Service message: the chat owner left the chat
+ * @method ChatOwnerChanged getChatOwnerChanged() Optional. Service message: the chat owner was changed
+ * @method bool getIsPaidPost() Optional. True, if the message is a paid post
+ * @method PaidMediaInfo getPaidMedia() Optional. Message contains paid media; information about the paid media
+ * @method StarTransaction getTransaction() Optional. Message is a service message about a successful payment for Telegram Stars, information about the transaction.
+ * @method WebAppInfo getWebApp() Optional. Service message: a Web App was launched for the user
+ * @method GiftInfo getGift() Optional. Service message: a regular gift was sent or received
+ * @method UniqueGiftInfo getUniqueGift() Optional. Service message: a unique gift was sent or received
+ * @method PaidMessagePriceChanged getPaidMessagePriceChanged() Optional. Service message: the price for paid messages has changed in the chat
+ * @method SuggestedPostApproved getSuggestedPostApproved() Optional. Service message: a suggested post was approved
+ * @method SuggestedPostApprovalFailed getSuggestedPostApprovalFailed() Optional. Service message: approval of a suggested post has failed
+ * @method SuggestedPostDeclined getSuggestedPostDeclined() Optional. Service message: a suggested post was declined
+ * @method SuggestedPostPaid getSuggestedPostPaid() Optional. Service message: payment for a suggested post was received
+ * @method SuggestedPostRefunded getSuggestedPostRefunded() Optional. Service message: payment for a suggested post was refunded
+ * @method ManagedBotCreated getManagedBotCreated() Optional. Message is a service message about a created managed bot
+ * @method PollOptionAdded getPollOptionAdded() Optional. Message is a service message about a poll option added
+ * @method PollOptionDeleted getPollOptionDeleted() Optional. Message is a service message about a poll option deleted
+ * @method int getReplyToPollOptionId() Optional. Identifier of the poll option to which the message is replied
+ * @method int getPaidStarCount() Optional. The number of Telegram Stars that were paid by the sender of the message to send it
*/
class Message extends Entity implements MaybeInaccessibleMessage
- * @method string getType() Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers)
+ * @method string getType() Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block quotation), “expandable_blockquote” (collapsed-by-default block quotation), “date_time” (formatted date and time), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers)
* @method int getOffset() Offset in UTF-16 code units to the start of the entity
* @method int getLength() Length of the entity in UTF-16 code units
* @method string getUrl() Optional. For "text_link" only, url that will be opened after user taps on the text
* @method User getUser() Optional. For "text_mention" only, the mentioned user
* @method string getLanguage() Optional. For "pre" only, the programming language of the entity text
* @method string getCustomEmojiId() Optional. For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker
+ * @method int getUnixTime() Optional. For “date_time” only, the Unix time associated with the entity
+ * @method string getDateTimeFormat() Optional. For “date_time” only, the string that defines the formatting of the date and time
* @method PollOption[] getOptions() List of poll options
* @method int getTotalVoterCount() Total number of users that voted in the poll
* @method bool getIsClosed() True, if the poll is closed
* @method bool getIsAnonymous() True, if the poll is anonymous
* @method string getType() Poll type, currently can be “regular” or “quiz”
* @method bool getAllowsMultipleAnswers() True, if the poll allows multiple answers
- * @method int getCorrectOptionId() Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.
+ * @method int[] getCorrectOptionIds() Optional. 0-based identifiers of correct answer options. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.
+ * @method bool getAllowsRevoting() Optional. True, if the poll allows voters to change their vote
+ * @method MessageEntity[] getDescriptionEntities() Optional. Special entities that appear in the description
* @method string getExplanation() Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters
* @method MessageEntity[] getExplanationEntities() Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation
* @method int getOpenPeriod() Optional. Amount of time in seconds the poll will be active after creation
* @method int getCloseDate() Optional. Point in time (Unix timestamp) when the poll will be automatically closed
+ * @method MessageEntity[] getQuestionEntities() Optional. Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions
+ * @method PollMedia getMedia() Optional. Media associated with the poll
+ * @method PollMedia getExplanationMedia() Optional. Media associated with the explanation
+ * @method bool getMembersOnly() Optional. True, if the poll can only be answered by chat members
+ * @method array getCountryCodes() Optional. List of country codes of countries whose residents can vote in the poll
+ * @method int getVoterCount() Number of users that voted for this option
+ * @method MessageEntity[] getTextEntities() Optional. Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts
+ * @method string getPersistentId() Optional. Unique identifier of the poll option
+ * @method User getAddedByUser() Optional. User that added the option
+ * @method Chat getAddedByChat() Optional. Chat that added the option
+ * @method int getAdditionDate() Optional. Date when the option was added in Unix time
+ * @method PollMedia getMedia() Optional. Media associated with the option
* @method int getMessageId() Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified
* @method int|string getChatId() Optional. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername)
* @method bool getAllowSendingWithoutReply() Optional. Pass True if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic.
* @method string getQuote() Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message.
* @method string getQuoteParseMode() Optional. Mode for parsing entities in the quote. See formatting options for more details.
* @method MessageEntity[] getQuoteEntities() Optional. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode.
* @method int getQuotePosition() Optional. Position of the quote in the original message in UTF-16 code units
+ * @method int getChecklistTaskId() Optional. Identifier of the specific checklist task to be replied to
+ * @method string getPollOptionId() Optional. Identifier of the specific poll option to be replied to
* @method int getIconColor() Color of the topic icon in RGB format
* @method string getIconCustomEmojiId() Optional. Unique identifier of the custom emoji shown as the topic icon
+ * @method bool getIsNameImplicit() Optional. True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Longman\TelegramBot\Entities;
use Longman\TelegramBot\Entities\Payments\PreCheckoutQuery;
use Longman\TelegramBot\Entities\Payments\ShippingQuery;
/**
* Class Update
*
* @link https://core.telegram.org/bots/api#update
*
* @method int getUpdateId() 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.
* @method Message getMessage() Optional. New incoming message of any kind — text, photo, sticker, etc.
* @method Message getEditedMessage() Optional. New version of a message that is known to the bot and was edited
* @method Message getChannelPost() Optional. New post in the channel, can be any kind — text, photo, sticker, etc.
* @method Message getEditedChannelPost() Optional. New version of a post in the channel that is known to the bot and was edited
* @method MessageReactionUpdated getMessageReaction() Optional. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify "message_reaction" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots.
* @method MessageReactionCountUpdated getMessageReactionCount() Optional. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify "message_reaction_count" in the list of allowed_updates to receive these updates. The updates are grouped and can be sent with delay up to a few minutes.
* @method InlineQuery getInlineQuery() Optional. New incoming inline query
* @method ChosenInlineResult getChosenInlineResult() Optional. The result of an inline query that was chosen by a user and sent to their chat partner.
* @method CallbackQuery getCallbackQuery() Optional. New incoming callback query
* @method ShippingQuery getShippingQuery() Optional. New incoming shipping query. Only for invoices with flexible price
* @method PreCheckoutQuery getPreCheckoutQuery() Optional. New incoming pre-checkout query. Contains full information about checkout
* @method Poll getPoll() Optional. New poll state. Bots receive only updates about polls, which are sent or stopped by the bot
* @method PollAnswer getPollAnswer() Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.
* @method ChatMemberUpdated getMyChatMember() Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.
* @method ChatMemberUpdated getChatMember() Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify “chat_member” in the list of allowed_updates to receive these updates.
* @method ChatJoinRequest getChatJoinRequest() Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates.
* @method ChatBoostUpdated getChatBoost() Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.
* @method ChatBoostRemoved getRemovedChatBoost() Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.
+ * @method BusinessConnection getBusinessConnection() Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot
+ * @method Message getBusinessMessage() Optional. New message from a connected business account
+ * @method Message getEditedBusinessMessage() Optional. New version of a message from a connected business account
+ * @method BusinessMessagesDeleted getDeletedBusinessMessages() Optional. Messages were deleted from a connected business account
+ * @method StarTransaction getTransaction() Optional. New incoming transaction; for bots only
+ * @method PaidMediaPurchased getPurchasedPaidMedia() Optional. A user purchased paid media with a payload for the bot
+ * @method Message getGuestMessage() Optional. A message in guest mode was sent
*/
class Update extends Entity
{
- public const TYPE_MESSAGE = 'message';
- public const TYPE_EDITED_MESSAGE = 'edited_message';
- public const TYPE_CHANNEL_POST = 'channel_post';
- public const TYPE_EDITED_CHANNEL_POST = 'edited_channel_post';
- public const TYPE_MESSAGE_REACTION = 'message_reaction';
- public const TYPE_MESSAGE_REACTION_COUNT = 'message_reaction_count';
- public const TYPE_INLINE_QUERY = 'inline_query';
- public const TYPE_CHOSEN_INLINE_RESULT = 'chosen_inline_result';
- public const TYPE_CALLBACK_QUERY = 'callback_query';
- public const TYPE_SHIPPING_QUERY = 'shipping_query';
- public const TYPE_PRE_CHECKOUT_QUERY = 'pre_checkout_query';
- public const TYPE_POLL = 'poll';
- public const TYPE_POLL_ANSWER = 'poll_answer';
- public const TYPE_MY_CHAT_MEMBER = 'my_chat_member';
- public const TYPE_CHAT_MEMBER = 'chat_member';
- public const TYPE_CHAT_JOIN_REQUEST = 'chat_join_request';
- public const TYPE_CHAT_BOOST = 'chat_boost';
- public const TYPE_REMOVED_CHAT_BOOST = 'removed_chat_boost';
+ public const TYPE_MESSAGE = 'message';
+ public const TYPE_EDITED_MESSAGE = 'edited_message';
+ public const TYPE_CHANNEL_POST = 'channel_post';
+ public const TYPE_EDITED_CHANNEL_POST = 'edited_channel_post';
+ public const TYPE_MESSAGE_REACTION = 'message_reaction';
+ public const TYPE_MESSAGE_REACTION_COUNT = 'message_reaction_count';
+ public const TYPE_INLINE_QUERY = 'inline_query';
+ public const TYPE_CHOSEN_INLINE_RESULT = 'chosen_inline_result';
+ public const TYPE_CALLBACK_QUERY = 'callback_query';
+ public const TYPE_SHIPPING_QUERY = 'shipping_query';
+ public const TYPE_PRE_CHECKOUT_QUERY = 'pre_checkout_query';
+ public const TYPE_POLL = 'poll';
+ public const TYPE_POLL_ANSWER = 'poll_answer';
+ public const TYPE_MY_CHAT_MEMBER = 'my_chat_member';
+ public const TYPE_CHAT_MEMBER = 'chat_member';
+ public const TYPE_CHAT_JOIN_REQUEST = 'chat_join_request';
+ public const TYPE_CHAT_BOOST = 'chat_boost';
+ public const TYPE_REMOVED_CHAT_BOOST = 'removed_chat_boost';
+ public const TYPE_BUSINESS_CONNECTION = 'business_connection';
+ public const TYPE_BUSINESS_MESSAGE = 'business_message';
+ public const TYPE_EDITED_BUSINESS_MESSAGE = 'edited_business_message';
+ public const TYPE_DELETED_BUSINESS_MESSAGES = 'deleted_business_messages';
+ public const TYPE_TRANSACTION = 'transaction';
+ public const TYPE_PURCHASED_PAID_MEDIA = 'purchased_paid_media';
+ public const TYPE_GUEST_MESSAGE = 'guest_message';
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Longman\TelegramBot\Entities;
/**
* Class User
*
* @link https://core.telegram.org/bots/api#user
*
- * @method int getId() Unique identifier for this user or bot
- * @method bool getIsBot() True, if this user is a bot
- * @method string getFirstName() User's or bot’s first name
- * @method string getLastName() Optional. User's or bot’s last name
- * @method string getUsername() Optional. User's or bot’s username
- * @method string getLanguageCode() Optional. IETF language tag of the user's language
- * @method bool getIsPremium() Optional. True, if this user is a Telegram Premium user
- * @method bool getAddedToAttachmentMenu() Optional. True, if this user added the bot to the attachment menu
- * @method bool getCanJoinGroups() Optional. True, if the bot can be invited to groups. Returned only in getMe.
- * @method bool getCanReadAllGroupMessages() Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.
- * @method bool getSupportsInlineQueries() Optional. True, if the bot supports inline queries. Returned only in getMe.
+ * @method int getId() Unique identifier for this user or bot
+ * @method bool getIsBot() True, if this user is a bot
+ * @method string getFirstName() User's or bot’s first name
+ * @method string getLastName() Optional. User's or bot’s last name
+ * @method string getUsername() Optional. User's or bot’s username
+ * @method string getLanguageCode() Optional. IETF language tag of the user's language
+ * @method bool getIsPremium() Optional. True, if this user is a Telegram Premium user
+ * @method bool getAddedToAttachmentMenu() Optional. True, if this user added the bot to the attachment menu
+ * @method bool getCanJoinGroups() Optional. True, if the bot can be invited to groups. Returned only in getMe.
+ * @method bool getCanReadAllGroupMessages() Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.
+ * @method bool getSupportsInlineQueries() Optional. True, if the bot supports inline queries. Returned only in getMe.
+ * @method bool getCanConnectToBusiness() Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.
+ * @method bool getHasMainWebApp() Optional. True, if the bot has a main Web App. Returned only in getMe.
+ * @method bool getHasTopicsEnabled() Optional. True, if the bot has forum topic mode enabled in private chats. Returned only in getMe.
+ * @method bool getSupportsJoinRequestQueries() Optional. True, if the bot supports join request queries. Returned only in getMe.
+ * @method bool getSupportsGuestQueries() Optional. True, if the bot supports guest queries. Returned only in getMe.
+ * @method bool getCanManageBots() Optional. True, if the user is allowed to create, edit, or delete managed bots. Returned only in getMe.
+ * @method bool getAllowsUsersToCreateTopics() Optional. True, if the bot allows users to create forum topics in private chats. Returned only in getMe.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Longman\TelegramBot\Entities;
/**
* Class Video
*
* @link https://core.telegram.org/bots/api#video
*
- * @method string getFileId() Identifier for this file, which can be used to download or reuse the file
- * @method string getFileUniqueId() Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
- * @method int getWidth() Video width as defined by sender
- * @method int getHeight() Video height as defined by sender
- * @method int getDuration() Duration of the video in seconds as defined by sender
- * @method PhotoSize getThumbnail() Optional. Video thumbnail
- * @method string getFileName() Optional. Original filename as defined by sender
- * @method string getMimeType() Optional. Mime type of a file as defined by sender
- * @method int getFileSize() Optional. File size
+ * @method string getFileId() Identifier for this file, which can be used to download or reuse the file
+ * @method string getFileUniqueId() Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
+ * @method int getWidth() Video width as defined by sender
+ * @method int getHeight() Video height as defined by sender
+ * @method int getDuration() Duration of the video in seconds as defined by sender
+ * @method PhotoSize[] getCover() Optional. Available sizes of the cover of the video in the message
+ * @method int getStartTimestamp() Optional. Timestamp in seconds from which the video will play in the message
+ * @method PhotoSize getThumbnail() Optional. Video thumbnail
+ * @method string getFileName() Optional. Original filename as defined by sender
+ * @method string getMimeType() Optional. Mime type of a file as defined by sender
+ * @method int getFileSize() Optional. File size
+ * @method VideoQuality[] getQualities() Optional. Available qualities of the video
* @property string $url An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps
*
* @method string getUrl() An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps
*
* @method $this setUrl(string $url) An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps
+ *
+ * @method bool getAllowWritingToPm() Optional. If true, a Web App can be opened from a link pressed in a bot's message always in full size, even if the Web App is not designed to support full size layout. Ignored for inline keyboard buttons.
+ * @method $this setAllowWritingToPm(bool $allowWritingToPm) Optional. If true, a Web App can be opened from a link pressed in a bot's message always in full size, even if the Web App is not designed to support full size layout. Ignored for inline keyboard buttons.