Semantically correct

This commit is contained in:
hydrabolt
2015-11-15 14:26:30 +00:00
parent fbd922e557
commit f1bde8a98a
6 changed files with 34 additions and 16 deletions

View File

@@ -24,14 +24,6 @@ var Channel = (function (_Equality) {
return this.client.deleteChannel.apply(this.client, reg(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; return Channel;
})(Equality); })(Equality);

View File

@@ -10,6 +10,7 @@ var Channel = require("./Channel.js");
var User = require("./User.js"); var User = require("./User.js");
var Equality = require("../Util/Equality.js"); var Equality = require("../Util/Equality.js");
var Cache = require("../Util/Cache.js"); var Cache = require("../Util/Cache.js");
var reg = require("../Util/ArgumentRegulariser.js").reg;
var PMChannel = (function (_Equality) { var PMChannel = (function (_Equality) {
_inherits(PMChannel, _Equality); _inherits(PMChannel, _Equality);
@@ -33,6 +34,14 @@ var PMChannel = (function (_Equality) {
return this.recipient.toString(); return this.recipient.toString();
}; };
PMChannel.prototype.sendMessage = function sendMessage() {
return this.client.sendMessage.apply(this.client, reg(this, arguments));
};
PMChannel.prototype.sendTTSMessage = function sendTTSMessage() {
return this.client.sendTTSMessage.apply(this.client, reg(this, arguments));
};
_createClass(PMChannel, [{ _createClass(PMChannel, [{
key: "lastMessage", key: "lastMessage",
get: function get() { get: function get() {

View File

@@ -39,6 +39,14 @@ var TextChannel = (function (_ServerChannel) {
return this.client.updateChannel.apply(this.client, reg(this, arguments)); return this.client.updateChannel.apply(this.client, reg(this, arguments));
}; };
TextChannel.prototype.sendMessage = function sendMessage() {
return this.client.sendMessage.apply(this.client, reg(this, arguments));
};
TextChannel.prototype.sendTTSMessage = function sendTTSMessage() {
return this.client.sendTTSMessage.apply(this.client, reg(this, arguments));
};
_createClass(TextChannel, [{ _createClass(TextChannel, [{
key: "lastMessage", key: "lastMessage",
get: function get() { get: function get() {

View File

@@ -17,14 +17,6 @@ class Channel extends Equality{
return this.client.deleteChannel.apply(this.client, reg(this, arguments)); return this.client.deleteChannel.apply(this.client, reg(this, arguments));
} }
sendMessage(){
return this.client.sendMessage.apply(this.client, reg(this, arguments));
}
sendTTSMessage(){
return this.client.sendTTSMessage.apply(this.client, reg(this, arguments));
}
} }
module.exports = Channel; module.exports = Channel;

View File

@@ -4,6 +4,7 @@ var Channel = require("./Channel.js");
var User = require("./User.js"); var User = require("./User.js");
var Equality = require("../Util/Equality.js"); var Equality = require("../Util/Equality.js");
var Cache = require("../Util/Cache.js"); var Cache = require("../Util/Cache.js");
var reg = require("../Util/ArgumentRegulariser.js").reg;
class PMChannel extends Equality{ class PMChannel extends Equality{
constructor(data, client){ constructor(data, client){
@@ -25,6 +26,14 @@ class PMChannel extends Equality{
toString(){ toString(){
return this.recipient.toString(); return this.recipient.toString();
} }
sendMessage(){
return this.client.sendMessage.apply(this.client, reg(this, arguments));
}
sendTTSMessage(){
return this.client.sendTTSMessage.apply(this.client, reg(this, arguments));
}
} }
module.exports = PMChannel; module.exports = PMChannel;

View File

@@ -31,6 +31,14 @@ class TextChannel extends ServerChannel{
update(){ update(){
return this.client.updateChannel.apply(this.client, reg(this, arguments)); return this.client.updateChannel.apply(this.client, reg(this, arguments));
} }
sendMessage(){
return this.client.sendMessage.apply(this.client, reg(this, arguments));
}
sendTTSMessage(){
return this.client.sendTTSMessage.apply(this.client, reg(this, arguments));
}
} }
module.exports = TextChannel; module.exports = TextChannel;