From f1bde8a98a13ae85d84225ba26f990d0a782c51f Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sun, 15 Nov 2015 14:26:30 +0000 Subject: [PATCH] Semantically correct --- lib/Structures/Channel.js | 8 -------- lib/Structures/PMChannel.js | 9 +++++++++ lib/Structures/TextChannel.js | 8 ++++++++ src/Structures/Channel.js | 8 -------- src/Structures/PMChannel.js | 9 +++++++++ src/Structures/TextChannel.js | 8 ++++++++ 6 files changed, 34 insertions(+), 16 deletions(-) diff --git a/lib/Structures/Channel.js b/lib/Structures/Channel.js index e46a28fb7..053bc38ca 100644 --- a/lib/Structures/Channel.js +++ b/lib/Structures/Channel.js @@ -24,14 +24,6 @@ var Channel = (function (_Equality) { 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; })(Equality); diff --git a/lib/Structures/PMChannel.js b/lib/Structures/PMChannel.js index dc28d1c66..837c4a378 100644 --- a/lib/Structures/PMChannel.js +++ b/lib/Structures/PMChannel.js @@ -10,6 +10,7 @@ var Channel = require("./Channel.js"); var User = require("./User.js"); var Equality = require("../Util/Equality.js"); var Cache = require("../Util/Cache.js"); +var reg = require("../Util/ArgumentRegulariser.js").reg; var PMChannel = (function (_Equality) { _inherits(PMChannel, _Equality); @@ -33,6 +34,14 @@ var PMChannel = (function (_Equality) { 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, [{ key: "lastMessage", get: function get() { diff --git a/lib/Structures/TextChannel.js b/lib/Structures/TextChannel.js index f94554f50..6e7a8a664 100644 --- a/lib/Structures/TextChannel.js +++ b/lib/Structures/TextChannel.js @@ -39,6 +39,14 @@ var TextChannel = (function (_ServerChannel) { 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, [{ key: "lastMessage", get: function get() { diff --git a/src/Structures/Channel.js b/src/Structures/Channel.js index 43897388e..11888a8ed 100644 --- a/src/Structures/Channel.js +++ b/src/Structures/Channel.js @@ -16,14 +16,6 @@ class Channel extends Equality{ delete(){ 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)); - } } diff --git a/src/Structures/PMChannel.js b/src/Structures/PMChannel.js index 4c776d399..0c3f94102 100644 --- a/src/Structures/PMChannel.js +++ b/src/Structures/PMChannel.js @@ -4,6 +4,7 @@ var Channel = require("./Channel.js"); var User = require("./User.js"); var Equality = require("../Util/Equality.js"); var Cache = require("../Util/Cache.js"); +var reg = require("../Util/ArgumentRegulariser.js").reg; class PMChannel extends Equality{ constructor(data, client){ @@ -25,6 +26,14 @@ class PMChannel extends Equality{ 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; \ No newline at end of file diff --git a/src/Structures/TextChannel.js b/src/Structures/TextChannel.js index 6270a44c1..70cf03c85 100644 --- a/src/Structures/TextChannel.js +++ b/src/Structures/TextChannel.js @@ -31,6 +31,14 @@ class TextChannel extends ServerChannel{ update(){ 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; \ No newline at end of file