mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
Compiled lib
This commit is contained in:
@@ -417,10 +417,10 @@ var Client = (function (_EventEmitter) {
|
||||
|
||||
// def setTopic
|
||||
|
||||
Client.prototype.setTopic = function setTopic(channel, topic) {
|
||||
Client.prototype.setChannelTopic = function setChannelTopic(channel, topic) {
|
||||
var callback = arguments.length <= 2 || arguments[2] === undefined ? function () /*err*/{} : arguments[2];
|
||||
|
||||
return this.internal.setTopic(channel, topic).then(callback, errCB(callback));
|
||||
return this.internal.setChannelTopic(channel, topic).then(callback, errCB(callback));
|
||||
};
|
||||
|
||||
//def setChannelName
|
||||
@@ -439,6 +439,14 @@ var Client = (function (_EventEmitter) {
|
||||
return this.internal.setChannelNameAndTopic(channel, name, topic).then(callback, errCB(callback));
|
||||
};
|
||||
|
||||
//def setChannelPosition
|
||||
|
||||
Client.prototype.setChannelPosition = function setChannelPosition(channel, position) {
|
||||
var callback = arguments.length <= 2 || arguments[2] === undefined ? function () /*err*/{} : arguments[2];
|
||||
|
||||
return this.internal.setChannelPosition(channel, position).then(callback, errCB(callback));
|
||||
};
|
||||
|
||||
//def updateChannel
|
||||
|
||||
Client.prototype.updateChannel = function updateChannel(channel, data) {
|
||||
|
||||
@@ -894,7 +894,7 @@ var InternalClient = (function () {
|
||||
|
||||
//def setTopic
|
||||
|
||||
InternalClient.prototype.setTopic = function setTopic(chann) {
|
||||
InternalClient.prototype.setChannelTopic = function setChannelTopic(chann) {
|
||||
var _this25 = this;
|
||||
|
||||
var topic = arguments.length <= 1 || arguments[1] === undefined ? "" : arguments[1];
|
||||
@@ -948,6 +948,24 @@ var InternalClient = (function () {
|
||||
});
|
||||
};
|
||||
|
||||
//def setTopic
|
||||
|
||||
InternalClient.prototype.setChannelPosition = function setChannelPosition(chann) {
|
||||
var _this28 = this;
|
||||
|
||||
var position = arguments.length <= 1 || arguments[1] === undefined ? 0 : arguments[1];
|
||||
|
||||
return this.resolver.resolveChannel(chann).then(function (channel) {
|
||||
return _superagent2["default"].patch(_Constants.Endpoints.CHANNEL(channel.id)).set("authorization", _this28.token).send({
|
||||
name: channel.name,
|
||||
position: position,
|
||||
topic: channel.topic
|
||||
}).end().then(function (res) {
|
||||
return channel.position = res.body.position;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
//def updateChannel
|
||||
|
||||
InternalClient.prototype.updateChannel = function updateChannel(chann, data) {
|
||||
|
||||
Reference in New Issue
Block a user