mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Added setTopic implementation
This commit is contained in:
@@ -460,6 +460,24 @@ var Client = (function (_EventEmitter) {
|
||||
});
|
||||
};
|
||||
|
||||
// def setTopic
|
||||
|
||||
Client.prototype.setTopic = function setTopic(channel, topic) {
|
||||
var callback = arguments.length <= 2 || arguments[2] === undefined ? function (err) {} : arguments[2];
|
||||
|
||||
var self = this;
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
self.internal.setTopic(channel, topic).then(function () {
|
||||
callback();
|
||||
resolve();
|
||||
})["catch"](function (e) {
|
||||
callback(e);
|
||||
reject(e);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
_createClass(Client, [{
|
||||
key: "users",
|
||||
get: function get() {
|
||||
|
||||
Reference in New Issue
Block a user