diff options
author | Heidar Bernhardsson <heidarbn@gmail.com> | 2017-02-06 22:11:49 +0800 |
---|---|---|
committer | Heidar Bernhardsson <heidarbn@gmail.com> | 2017-02-06 22:11:49 +0800 |
commit | 1f6c27f458ed9eca41e3920b15c9e32ce831c65b (patch) | |
tree | ee6e0f9c34bb9988e5a1f92ba3a7370c3860bb7a /index.js | |
parent | Add semicolon (diff) | |
download | shulker-1f6c27f458ed9eca41e3920b15c9e32ce831c65b.tar.gz shulker-1f6c27f458ed9eca41e3920b15c9e32ce831c65b.zip |
update discord.js and fix channel retreival
Diffstat (limited to '')
-rw-r--r-- | index.js | 6 |
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; |