summary refs log tree commit diff homepage
path: root/index.js
diff options
context:
space:
mode:
authorsecret_online <me+github@secretonline.co>2016-01-23 10:31:30 +1300
committersecret_online <me+github@secretonline.co>2016-01-23 10:31:30 +1300
commit979e3805d7982ac3e87e102c513833682614e211 (patch)
treea509263b465fbf46991a40b326c2578b6c2685f0 /index.js
parentBeautify with JS Beautify (diff)
downloadshulker-979e3805d7982ac3e87e102c513833682614e211.tar.gz
shulker-979e3805d7982ac3e87e102c513833682614e211.zip
Check Discord channel ID for incoming messages
Diffstat (limited to '')
-rw-r--r--index.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/index.js b/index.js
index aae741b..2d60b12 100644
--- a/index.js
+++ b/index.js
@@ -58,11 +58,13 @@ shulker.on("ready", function() {
 });
 
 shulker.on("message", function(message) {
-    if (message.author.id !== shulker.user.id) {
-        var data = {
-            text: "<" + message.author.username + "> " + message.content
-        };
-        client.send('tellraw @a ["",' + JSON.stringify(data) + ']');
+    if (message.channel.id === shulker.channels.get("name", c.DISCORD_CHANNEL).id) {
+        if (message.author.id !== shulker.user.id) {
+            var data = {
+                text: "<" + message.author.username + "> " + message.content
+            };
+            client.send('tellraw @a ["",' + JSON.stringify(data) + ']');
+        }
     }
 });