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:
parent
8e8d0c9b3e
commit
8fc6e6098c
1 changed files with 55 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue