More things

This commit is contained in:
hydrabolt
2015-11-15 14:21:22 +00:00
parent 68ac437ef0
commit fbd922e557
9 changed files with 65 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
var Equality = require("../Util/Equality.js");
var Cache = require("../Util/Cache.js");
var PermissionOverwrite = require("./PermissionOverwrite.js");
var reg = require("../Util/ArgumentRegulariser.js").reg;
var Channel = (function (_Equality) {
_inherits(Channel, _Equality);
@@ -20,7 +21,15 @@ var Channel = (function (_Equality) {
}
Channel.prototype["delete"] = function _delete() {
return this.client.deleteChannel.apply(this, arguments);
return this.client.deleteChannel.apply(this.client, reg(this, arguments));
};
Channel.prototype.sendMessage = function sendMessage() {
return this.client.sendMessage.apply(this.client, reg(this, arguments));
};
Channel.prototype.sendTTSMessage = function sendTTSMessage() {
return this.client.sendTTSMessage.apply(this.client, reg(this, arguments));
};
return Channel;

View File

@@ -101,6 +101,10 @@ var ServerChannel = (function (_Channel) {
return this.name;
};
ServerChannel.prototype.setName = function setName() {
return this.client.setChannelName.apply(this.client, reg(this, arguments));
};
return ServerChannel;
})(Channel);

View File

@@ -8,6 +8,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
var ServerChannel = require("./ServerChannel.js");
var Cache = require("../Util/Cache.js");
var reg = require("../Util/ArgumentRegulariser.js").reg;
var TextChannel = (function (_ServerChannel) {
_inherits(TextChannel, _ServerChannel);
@@ -26,6 +27,18 @@ var TextChannel = (function (_ServerChannel) {
/* warning! may return null */
TextChannel.prototype.setTopic = function setTopic() {
return this.client.setTopic.apply(this.client, reg(this, arguments));
};
TextChannel.prototype.setNameAndTopic = function setNameAndTopic() {
return this.client.setChannelNameAndTopic.apply(this.client, reg(this, arguments));
};
TextChannel.prototype.update = function update() {
return this.client.updateChannel.apply(this.client, reg(this, arguments));
};
_createClass(TextChannel, [{
key: "lastMessage",
get: function get() {