diff --git a/README.md b/README.md index 5a44b47..22d3c90 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,12 @@ TelegramBot * [.sendVideo(chatId, video, [options])](#TelegramBot+sendVideo) ⇒ Promise * [.sendVoice(chatId, voice, [options])](#TelegramBot+sendVoice) ⇒ Promise * [.sendChatAction(chatId, action)](#TelegramBot+sendChatAction) ⇒ Promise + * [.kickChatMember(chatId, userId)](#TelegramBot+kickChatMember) ⇒ Promise + * [.unbanChatMember(chatId, userId)](#TelegramBot+unbanChatMember) ⇒ Promise + * [.answerCallbackQuery(callbackQueryId, text, showAlert, [options])](#TelegramBot+answerCallbackQuery) ⇒ Promise + * [.editMessageText(text, [options])](#TelegramBot+editMessageText) ⇒ Promise + * [.editMessageCaption(caption, [options])](#TelegramBot+editMessageCaption) ⇒ Promise + * [.editMessageReplyMarkup(replyMarkup, [options])](#TelegramBot+editMessageReplyMarkup) ⇒ Promise * [.getUserProfilePhotos(userId, [offset], [limit])](#TelegramBot+getUserProfilePhotos) ⇒ Promise * [.sendLocation(chatId, latitude, longitude, [options])](#TelegramBot+sendLocation) ⇒ Promise * [.getFile(fileId)](#TelegramBot+getFile) ⇒ Promise @@ -275,6 +281,111 @@ Send chat action. | chatId | Number | String | Unique identifier for the message recipient | | action | String | Type of action to broadcast. | + + +### telegramBot.kickChatMember(chatId, userId) ⇒ Promise +Use this method to kick a user from a group or a supergroup. +In the case of supergroups, the user will not be able to return +to the group on their own using invite links, etc., unless unbanned +first. The bot must be an administrator in the group for this to work. +Returns True on success. + +**Kind**: instance method of [TelegramBot](#TelegramBot) +**See**: https://core.telegram.org/bots/api#kickchatmember + +| Param | Type | Description | +| --- | --- | --- | +| chatId | Number | String | Unique identifier for the target group or username of the target supergroup | +| userId | String | Unique identifier of the target user | + + + +### telegramBot.unbanChatMember(chatId, userId) ⇒ Promise +Use this method to unban a previously kicked user in a supergroup. +The user will not return to the group automatically, but will be +able to join via link, etc. The bot must be an administrator in +the group for this to work. Returns True on success. + +**Kind**: instance method of [TelegramBot](#TelegramBot) +**See**: https://core.telegram.org/bots/api#unbanchatmember + +| Param | Type | Description | +| --- | --- | --- | +| chatId | Number | String | Unique identifier for the target group or username of the target supergroup | +| userId | String | Unique identifier of the target user | + + + +### telegramBot.answerCallbackQuery(callbackQueryId, text, showAlert, [options]) ⇒ Promise +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. + +**Kind**: instance method of [TelegramBot](#TelegramBot) +**See**: https://core.telegram.org/bots/api#answercallbackquery + +| Param | Type | Description | +| --- | --- | --- | +| callbackQueryId | Number | String | Unique identifier for the query to be answered | +| text | String | Text of the notification. If not specified, nothing will be shown to the user | +| showAlert | Boolean | Whether to show an alert or a notification at the top of the screen | +| [options] | Object | Additional Telegram query options | + + + +### telegramBot.editMessageText(text, [options]) ⇒ Promise +Use this method to edit text messages sent by the bot or via +the bot (for inline bots). On success, the edited Message is +returned. + +Note that you must provide one of chat_id, message_id, or +inline_message_id in your request. + +**Kind**: instance method of [TelegramBot](#TelegramBot) +**See**: https://core.telegram.org/bots/api#editmessagetext + +| Param | Type | Description | +| --- | --- | --- | +| text | String | New text of the message | +| [options] | Object | Additional Telegram query options (provide either one of chat_id, message_id, or inline_message_id here) | + + + +### telegramBot.editMessageCaption(caption, [options]) ⇒ Promise +Use this method to edit captions of messages sent by the +bot or via the bot (for inline bots). On success, the +edited Message is returned. + +Note that you must provide one of chat_id, message_id, or +inline_message_id in your request. + +**Kind**: instance method of [TelegramBot](#TelegramBot) +**See**: https://core.telegram.org/bots/api#editmessagetext + +| Param | Type | Description | +| --- | --- | --- | +| caption | String | New caption of the message | +| [options] | Object | Additional Telegram query options (provide either one of chat_id, message_id, or inline_message_id here) | + + + +### telegramBot.editMessageReplyMarkup(replyMarkup, [options]) ⇒ Promise +Use this method to edit only the reply markup of messages +sent by the bot or via the bot (for inline bots). +On success, the edited Message is returned. + +Note that you must provide one of chat_id, message_id, or +inline_message_id in your request. + +**Kind**: instance method of [TelegramBot](#TelegramBot) +**See**: https://core.telegram.org/bots/api#editmessagetext + +| Param | Type | Description | +| --- | --- | --- | +| replyMarkup | Object | A JSON-serialized object for an inline keyboard. | +| [options] | Object | Additional Telegram query options (provide either one of chat_id, message_id, or inline_message_id here) | + ### telegramBot.getUserProfilePhotos(userId, [offset], [limit]) ⇒ Promise