feat: add or remove labels (#1915)

* add or remove labels

* Strings use singlequote

* add event chat change labels

* Revert "add event chat change labels"
This commit is contained in:
tofers 2023-06-25 22:25:49 +03:00 • committed by GitHub
commit 8fc6e6098c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -261,6 +261,15 @@ class Chat extends Base {
async getLabels() {
return this.client.getChatLabels(this.id._serialized);
}
/**
* Add or remove labels to this Chat
* @param {Array<number|string>} labelIds
* @returns {Promise<void>}
*/
async changeLabels(labelIds) {
return this.client.addOrRemoveLabels(labelIds, [this.id._serialized]);
}
}
module.exports = Chat;