Added channel.delete()

This commit is contained in:
hydrabolt
2016-04-27 16:25:57 +01:00
parent b436fac5c4
commit 2341c83638
7 changed files with 51 additions and 8 deletions

View File

@@ -85,6 +85,17 @@ class RESTMethods{
.catch(reject);
});
}
DeleteChannel(channel) {
return new Promise((resolve, reject) => {
this.rest.makeRequest('del', Constants.Endpoints.CHANNEL(channel.id), true)
.then(data => {
data.id = channel.id;
resolve(this.rest.client.actions.ChannelDelete.handle(data).channel);
})
.catch(reject);
});
}
}
module.exports = RESTMethods;