summary refs log tree commit diff homepage
path: root/index.js
diff options
context:
space:
mode:
authordestruc7i0n <destruc7i0n@users.noreply.github.com>2017-02-09 12:15:41 -0500
committerGitHub <noreply@github.com>2017-02-09 12:15:41 -0500
commitba8fa952343d33b1224bb949f70cc565b491ba22 (patch)
treec3f422faff8121fe27d87f7ab7a3a8baab027996 /index.js
parentLatest node version Travis (diff)
parentadd some extra useful info (diff)
downloadshulker-ba8fa952343d33b1224bb949f70cc565b491ba22.tar.gz
shulker-ba8fa952343d33b1224bb949f70cc565b491ba22.zip
Merge pull request #17 from heidar/master
Update discord.js and improve README
Diffstat (limited to '')
-rw-r--r--index.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/index.js b/index.js
index f3f9629..2c21524 100644
--- a/index.js
+++ b/index.js
@@ -39,14 +39,14 @@ shulker.on("ready", function() {
                 console.log("[DEBUG] Text: " + bodymatch[2]);
             }
             var message = "`" + bodymatch[1].replace(/(\ยง[A-Z-a-z-0-9])/g, "") + "`:" + bodymatch[2];
-            shulker.channels.get("id", channel).sendMessage(message);
+            shulker.channels.get(channel).sendMessage(message);
         }
         response.send("");
     });
 });
 
 shulker.on("message", function(message) {
-    if (message.channel.id === shulker.channels.get("name", c.DISCORD_CHANNEL).id) {
+    if (message.channel.id === shulker.channels.get(c.DISCORD_CHANNEL_ID).id) {
         if (message.author.id !== shulker.user.id) {
             var data = {
                 text: "<" + message.author.username + "> " + message.cleanContent
@@ -61,7 +61,7 @@ shulker.on("message", function(message) {
     }
 });
 
-shulker.loginWithToken(c.DISCORD_TOKEN);
+shulker.login(c.DISCORD_TOKEN);
 
 var ipaddress = process.env.OPENSHIFT_NODEJS_IP || process.env.IP || "127.0.0.1";
 var serverport = process.env.OPENSHIFT_NODEJS_PORT || process.env.PORT || c.PORT;