(SELECT COUNT(DISTINCT `chat_id`) FROM `'.TB_REQUEST_LIMITER.'` WHERE `created_at` >= :created_at_1) AS LIMIT_PER_SEC_ALL,
(SELECT COUNT(*) FROM `'.TB_REQUEST_LIMITER.'` WHERE `created_at` >= :created_at_2 AND ((`chat_id` = :chat_id_1 AND `inline_message_id` IS NULL) OR (`inline_message_id` = :inline_message_id AND `chat_id` IS NULL))) AS LIMIT_PER_SEC,
(SELECT COUNT(*) FROM `'.TB_REQUEST_LIMITER.'` WHERE `created_at` >= :created_at_minute AND `chat_id` = :chat_id_2) AS LIMIT_PER_MINUTE
* @method bool getCanRestrictMembers() Optional. Administrators only. True, if the administrator can restrict, ban or unban chat members
* @method bool getCanPinMessages() Optional. Administrators only. True, if the administrator can pin messages, supergroups only
* @method bool getCanPromoteMembers() Optional. Administrators only. True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
* @method bool getIsMember() Optional. Restricted only. True, if the user is a member of the chat at the moment of the request
* @method bool getCanSendMessages() Optional. Restricted only. True, if the user can send text messages, contacts, locations and venues
* @method bool getCanSendMediaMessages() Optional. Restricted only. True, if the user can send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages
* @method bool getCanSendOtherMessages() Optional. Restricted only. True, if the user can send animations, games, stickers and use inline bots, implies can_send_media_messages
@@ -28,6 +28,7 @@ use Longman\TelegramBot\Entities\TelegramPassport\PassportData;
* @method Chat getForwardFromChat() Optional. For messages forwarded from a channel, information about the original channel
* @method int getForwardFromMessageId() Optional. For forwarded channel posts, identifier of the original message in the channel
* @method string getForwardSignature() Optional. For messages forwarded from channels, signature of the post author if present
* @method string getForwardSenderName() Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages
* @method int getForwardDate() Optional. For forwarded messages, date the original message was sent in Unix time
* @method Message 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 int getEditDate() Optional. Date the message was last edited in Unix time
...
...
@@ -45,6 +46,7 @@ use Longman\TelegramBot\Entities\TelegramPassport\PassportData;
* @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 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 bool getDeleteChatPhoto() Optional. Service message: the chat photo was deleted
@@ -42,6 +42,7 @@ use Longman\TelegramBot\Exception\TelegramException;
* @method static ServerResponse stopMessageLiveLocation(array $data) Use this method to stop updating a live location message sent by the bot or via the bot (for inline bots) before live_period expires. On success, if the message was sent by the bot, the sent Message is returned, otherwise True is returned.
* @method static ServerResponse sendVenue(array $data) Use this method to send information about a venue. On success, the sent Message is returned.
* @method static ServerResponse sendContact(array $data) Use this method to send phone contacts. On success, the sent Message is returned.
* @method static ServerResponse sendPoll(array $data) Use this method to send a native poll. A native poll can't be sent to a private chat. On success, the sent Message is returned.
* @method static ServerResponse sendChatAction(array $data) Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.
* @method static ServerResponse getUserProfilePhotos(array $data) Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
* @method static ServerResponse getFile(array $data) Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.
...
...
@@ -69,6 +70,7 @@ use Longman\TelegramBot\Exception\TelegramException;
* @method static ServerResponse editMessageCaption(array $data) Use this method to edit captions of messages sent by the bot or via the bot (for inline bots). On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
* @method static ServerResponse editMessageMedia(array $data) Use this method to edit audio, document, photo, or video messages. On success, if the edited message was sent by the bot, the edited Message is returned, otherwise True is returned.
* @method static ServerResponse editMessageReplyMarkup(array $data) Use this method to edit only the reply markup of messages sent by the bot or via the bot (for inline bots). On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
* @method static ServerResponse stopPoll(array $data) Use this method to stop a poll which was sent by the bot. On success, the stopped Poll with the final results is returned.
* @method static ServerResponse deleteMessage(array $data) Use this method to delete a message, including service messages, with certain limitations. Returns True on success.
* @method static ServerResponse getStickerSet(array $data) Use this method to get a sticker set. On success, a StickerSet object is returned.
* @method static ServerResponse uploadStickerFile(array $data) Use this method to upload a .png file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.
`result_id`CHAR(255)NOTNULLDEFAULT''COMMENT'The unique identifier for the result that was chosen',
`user_id`bigintNULLCOMMENT'The user that chose the result',
`location`CHAR(255)NULLDEFAULTNULLCOMMENT'Sender location, only for bots that require user location',
`inline_message_id`CHAR(255)NULLDEFAULTNULLCOMMENT'Identifier of the sent inline message',
`query`TEXTNOTNULLCOMMENT'The query that was used to obtain the result',
`created_at`timestampNULLDEFAULTNULLCOMMENT'Entry date creation',
...
...
@@ -73,12 +75,17 @@ CREATE TABLE IF NOT EXISTS `message` (
`forward_from`bigintNULLDEFAULTNULLCOMMENT'Unique user identifier, sender of the original message',
`forward_from_chat`bigintNULLDEFAULTNULLCOMMENT'Unique chat identifier, chat the original message belongs to',
`forward_from_message_id`bigintNULLDEFAULTNULLCOMMENT'Unique chat identifier of the original message in the channel',
`forward_signature`TEXTNULLDEFAULTNULLCOMMENT'For messages forwarded from channels, signature of the post author if present',
`forward_sender_name`TEXTNULLDEFAULTNULLCOMMENT'Sender''s name for messages forwarded from users who disallow adding a link to their account in forwarded messages',
`forward_date`timestampNULLDEFAULTNULLCOMMENT'date the original message was sent in timestamp format',
`reply_to_message`bigintUNSIGNEDDEFAULTNULLCOMMENT'Message that this message is reply to',
`edit_date`bigintUNSIGNEDDEFAULTNULLCOMMENT'Date the message was last edited in Unix time',
`media_group_id`TEXTCOMMENT'The unique identifier of a media message group this message belongs to',
`author_signature`TEXTCOMMENT'Signature of the post author for messages in channels',
`text`TEXTCOMMENT'For text messages, the actual UTF-8 text of the message max message length 4096 char utf8mb4',
`entities`TEXTCOMMENT'For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text',
`caption_entities`TEXTCOMMENT'For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption',
`audio`TEXTCOMMENT'Audio object. Message is an audio file, information about the file',
`document`TEXTCOMMENT'Document object. Message is a general file, information about the file',
`animation`TEXTCOMMENT'Message is an animation, information about the animation',
...
...
@@ -88,10 +95,11 @@ CREATE TABLE IF NOT EXISTS `message` (
`video`TEXTCOMMENT'Video object. Message is a video, information about the video',
`voice`TEXTCOMMENT'Voice Object. Message is a Voice, information about the Voice',
`video_note`TEXTCOMMENT'VoiceNote Object. Message is a Video Note, information about the Video Note',
`caption`TEXTCOMMENT'For message with caption, the actual UTF-8 text of the caption',
`contact`TEXTCOMMENT'Contact object. Message is a shared contact, information about the contact',
`location`TEXTCOMMENT'Location object. Message is a shared location, information about the location',
`venue`TEXTCOMMENT'Venue object. Message is a Venue, information about the Venue',
`caption`TEXTCOMMENT'For message with caption, the actual UTF-8 text of the caption',
`poll`TEXTCOMMENT'Poll object. Message is a native poll, information about the poll',
`new_chat_members`TEXTCOMMENT'List of unique user identifiers, new member(s) were added to the group, information about them (one of these members may be the bot itself)',
`left_chat_member`bigintNULLDEFAULTNULLCOMMENT'Unique user identifier, a member was removed from the group, information about them (this member may be the bot itself)',
`new_chat_title`CHAR(255)DEFAULTNULLCOMMENT'A chat title was changed to this value',
...
...
@@ -103,6 +111,8 @@ CREATE TABLE IF NOT EXISTS `message` (
`migrate_to_chat_id`bigintNULLDEFAULTNULLCOMMENT'Migrate to chat identifier. The group has been migrated to a supergroup with the specified identifier',
`migrate_from_chat_id`bigintNULLDEFAULTNULLCOMMENT'Migrate from chat identifier. The supergroup has been migrated from a group with the specified identifier',
`pinned_message`TEXTNULLCOMMENT'Message object. Specified message was pinned',
`invoice`TEXTNULLCOMMENT'Message is an invoice for a payment, information about the invoice',
`successful_payment`TEXTNULLCOMMENT'Message is a service message about a successful payment, information about the payment',
`connected_website`TEXTNULLCOMMENT'The domain name of the website on which the user has logged in.',
`inline_message_id`CHAR(255)NULLDEFAULTNULLCOMMENT'Identifier of the message sent via the bot in inline mode, that originated the query',
`chat_instance`CHAR(255)NOTNULLDEFAULT''COMMENT'Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent',
`data`CHAR(255)NOTNULLDEFAULT''COMMENT'Data associated with the callback button',
`game_short_name`CHAR(255)NOTNULLDEFAULT''COMMENT'Short name of a Game to be returned, serves as the unique identifier for the game',
`created_at`timestampNULLDEFAULTNULLCOMMENT'Entry date creation',
PRIMARYKEY(`id`),
...
...
@@ -143,47 +175,81 @@ CREATE TABLE IF NOT EXISTS `callback_query` (
ALTERTABLE`chat`ADDCOLUMN`first_name`CHAR(255)DEFAULTNULLCOMMENT'First name of the other party in a private chat'AFTER`username`;
ALTERTABLE`chat`ADDCOLUMN`last_name`CHAR(255)DEFAULTNULLCOMMENT'Last name of the other party in a private chat'AFTER`first_name`;
ALTERTABLE`message`ADDCOLUMN`forward_signature`TEXTNULLDEFAULTNULLCOMMENT'For messages forwarded from channels, signature of the post author if present'AFTER`forward_from_message_id`;
ALTERTABLE`message`ADDCOLUMN`forward_sender_name`TEXTNULLDEFAULTNULLCOMMENT'Sender''s name for messages forwarded from users who disallow adding a link to their account in forwarded messages'AFTER`forward_signature`;
ALTERTABLE`message`ADDCOLUMN`edit_date`bigintUNSIGNEDDEFAULTNULLCOMMENT'Date the message was last edited in Unix time'AFTER`reply_to_message`;
ALTERTABLE`message`ADDCOLUMN`author_signature`TEXTCOMMENT'Signature of the post author for messages in channels'AFTER`media_group_id`;
ALTERTABLE`message`ADDCOLUMN`caption_entities`TEXTCOMMENT'For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption';
ALTERTABLE`message`ADDCOLUMN`animation`TEXTNULLCOMMENT'Message is an animation, information about the animation'AFTER`document`;
ALTERTABLE`message`ADDCOLUMN`poll`TEXTCOMMENT'Poll object. Message is a native poll, information about the poll'AFTER`venue`;
ALTERTABLE`message`ADDCOLUMN`invoice`TEXTNULLCOMMENT'Message is an invoice for a payment, information about the invoice'AFTER`pinned_message`;
ALTERTABLE`message`ADDCOLUMN`successful_payment`TEXTNULLCOMMENT'Message is a service message about a successful payment, information about the payment'AFTER`invoice`;
ALTERTABLE`callback_query`ADDCOLUMN`chat_instance`CHAR(255)NOTNULLDEFAULT''COMMENT'Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent'AFTER`inline_message_id`;
ALTERTABLE`callback_query`ADDCOLUMN`game_short_name`CHAR(255)NOTNULLDEFAULT''COMMENT'Short name of a Game to be returned, serves as the unique identifier for the game'AFTER`data`;
ALTERTABLE`telegram_update`ADDCOLUMN`channel_post_id`bigintUNSIGNEDDEFAULTNULLCOMMENT'New incoming channel post of any kind - text, photo, sticker, etc.';
ALTERTABLE`telegram_update`ADDCOLUMN`edited_channel_post_id`bigintUNSIGNEDDEFAULTNULLCOMMENT'New version of a channel post that is known to the bot and was edited';
ALTERTABLE`telegram_update`ADDCOLUMN`shipping_query_id`bigintUNSIGNEDDEFAULTNULLCOMMENT'New incoming shipping query. Only for invoices with flexible price';
ALTERTABLE`telegram_update`ADDCOLUMN`pre_checkout_query_id`bigintUNSIGNEDDEFAULTNULLCOMMENT'New incoming pre-checkout query. Contains full information about checkout';
ALTERTABLE`telegram_update`ADDCOLUMN`poll_id`bigintUNSIGNEDDEFAULTNULLCOMMENT'New poll state. Bots receive only updates about polls, which are sent or stopped by the bot';