You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://telegram.me/PHP_Telegram_Bot_Support)
@@ -76,7 +76,7 @@ This Bot aims to provide a platform where one can simply write a bot and have in
76
76
77
77
The Bot can:
78
78
- Retrieve updates with [webhook](#webhook-installation) and [getUpdates](#getupdates-installation) methods.
79
-
- Supports all types and methods according to Telegram API 4.6 (January 2020).
79
+
- Supports all types and methods according to Telegram API 4.7 (March 2020).
80
80
- Supports supergroups.
81
81
- Handle commands in chat with other bots.
82
82
- Manage Channel from the bot admin interface.
@@ -94,7 +94,7 @@ This code is available on [GitHub](https://github.com/php-telegram-bot/core). Pu
94
94
### Create your first bot
95
95
96
96
1. Message [`@BotFather`](https://telegram.me/BotFather) with the following text: `/newbot`
97
-
97
+
98
98
If you don't know how to message by username, click the search field on your Telegram app and type `@BotFather`, where you should be able to initiate a conversation. Be careful not to send it to the wrong contact, because some users have similar usernames to `BotFather`.
Copy file name to clipboardExpand all lines: src/Entities/Message.php
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,7 @@
51
51
* @method Location getLocation() Optional. Message is a shared location, information about the location
52
52
* @method Venue getVenue() Optional. Message is a venue, information about the venue
53
53
* @method Poll getPoll() Optional. Message is a native poll, information about the poll
54
+
* @method Dice getDice() Optional. Message is a dice with random value from 1 to 6
54
55
* @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)
55
56
* @method User getLeftChatMember() Optional. A member was removed from the group, information about them (this member may be the bot itself)
56
57
* @method string getNewChatTitle() Optional. A chat title was changed to this value
@@ -96,6 +97,7 @@ protected function subEntities()
Copy file name to clipboardExpand all lines: src/Request.php
+14-2Lines changed: 14 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,7 @@
46
46
* @method static ServerResponse sendVenue(array $data) Use this method to send information about a venue. On success, the sent Message is returned.
47
47
* @method static ServerResponse sendContact(array $data) Use this method to send phone contacts. On success, the sent Message is returned.
48
48
* @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.
49
+
* @method static ServerResponse sendDice(array $data) Use this method to send a dice, which will have a random value from 1 to 6. On success, the sent Message is returned.
49
50
* @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.
50
51
* @method static ServerResponse getUserProfilePhotos(array $data) Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
51
52
* @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.
@@ -71,6 +72,8 @@
71
72
* @method static ServerResponse deleteChatStickerSet(array $data) Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
72
73
* @method static ServerResponse answerCallbackQuery(array $data) Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.
73
74
* @method static ServerResponse answerInlineQuery(array $data) Use this method to send answers to an inline query. On success, True is returned.
75
+
* @method static ServerResponse setMyCommands(array $data) Use this method to change the list of the bot's commands. Returns True on success.
76
+
* @method static ServerResponse getMyCommands() Use this method to get the current list of the bot's commands. Requires no parameters. Returns Array of BotCommand on success.
74
77
* @method static ServerResponse editMessageText(array $data) Use this method to edit text and game 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.
75
78
* @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.
76
79
* @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.
@@ -83,6 +86,7 @@
83
86
* @method static ServerResponse addStickerToSet(array $data) Use this method to add a new sticker to a set created by the bot. Returns True on success.
84
87
* @method static ServerResponse setStickerPositionInSet(array $data) Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.
85
88
* @method static ServerResponse deleteStickerFromSet(array $data) Use this method to delete a sticker from a set created by the bot. Returns True on success.
89
+
* @method static ServerResponse setStickerSetThumb(array $data) Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Returns True on success.
86
90
* @method static ServerResponse sendInvoice(array $data) Use this method to send invoices. On success, the sent Message is returned.
87
91
* @method static ServerResponse answerShippingQuery(array $data) If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.
88
92
* @method static ServerResponse answerPreCheckoutQuery(array $data) Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned.
Copy file name to clipboardExpand all lines: structure.sql
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -100,6 +100,7 @@ CREATE TABLE IF NOT EXISTS `message` (
100
100
`location`TEXT COMMENT 'Location object. Message is a shared location, information about the location',
101
101
`venue`TEXT COMMENT 'Venue object. Message is a Venue, information about the Venue',
102
102
`poll`TEXT COMMENT 'Poll object. Message is a native poll, information about the poll',
103
+
`dice`TEXT COMMENT 'Message is a dice with random value from 1 to 6',
103
104
`new_chat_members`TEXT COMMENT '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)',
104
105
`left_chat_member`bigintNULL DEFAULT NULL COMMENT 'Unique user identifier, a member was removed from the group, information about them (this member may be the bot itself)',
105
106
`new_chat_title`CHAR(255) DEFAULT NULL COMMENT 'A chat title was changed to this value',
ALTERTABLE`poll` ADD COLUMN `type`char(255) COMMENT 'Poll type, currently can be “regular” or “quiz”' AFTER `is_anonymous`;
4
4
ALTERTABLE`poll` ADD COLUMN `allows_multiple_answers`tinyint(1) DEFAULT 0 COMMENT 'True, if the poll allows multiple answers' AFTER `type`;
5
5
ALTERTABLE`poll` ADD COLUMN `correct_option_id`int UNSIGNED COMMENT '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.' AFTER `allows_multiple_answers`;
6
+
ALTERTABLE`message` ADD COLUMN `dice`TEXT COMMENT 'Message is a dice with random value from 1 to 6' AFTER `poll`;
0 commit comments