Added setTopic implementation

This commit is contained in:
hydrabolt
2015-11-06 20:07:28 +00:00
parent 81a8771063
commit 98a62eb94e
4 changed files with 95 additions and 0 deletions

View File

@@ -441,6 +441,24 @@ class Client extends EventEmitter {
});
}
// def setTopic
setTopic(channel, topic, callback=function(err){}){
var self = this;
return new Promise((resolve, reject) => {
self.internal.setTopic(channel, topic)
.then(() => {
callback();
resolve();
})
.catch(e => {
callback(e);
reject(e);
});
})
}
}
module.exports = Client;