Skip to content

Commit

Permalink
[API v3.4] Support sticker sets
Browse files Browse the repository at this point in the history
  • Loading branch information
kamikazechaser committed Oct 13, 2017
1 parent 8fd243e commit 4d90529
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -1386,6 +1386,34 @@ class TelegramBot extends EventEmitter {
return this._request('leaveChat', { form });
}

/**
* Use this method to set a new group sticker set for a supergroup.
* @param {Number|String} chatId Unique identifier for the target group or username of the target supergroup (in the format @supergroupusername)
* @param {String} stickerSetName Name of the sticker set to be set as the group sticker set
* @return {Promise}
* @see https://core.telegram.org/bots/api#setchatstickerset
*/
setChatStickerSet(chatId, stickerSetName) {
const form = {
chat_id: chatId,
sticker_set_name: stickerSetName
};
return this._request('setChatStickerSet', { form });
}

/**
* Use this method to delete a group sticker set from a supergroup.
* @param {Number|String} chatId Unique identifier for the target group or username of the target supergroup (in the format @supergroupusername)
* @return {Promise}
* @see https://core.telegram.org/bots/api#deletechatstickerset
*/
deleteChatStickerSet(chatId) {
const form = {
chat_id: chatId
};
return this._request('deleteChatStickerSet', { form });
}

/**
* Use this method to send a game.
* @param {Number|String} chatId Unique identifier for the message recipient
Expand Down

0 comments on commit 4d90529

Please sign in to comment.