From 106addbb1a0293c23b6bfd8f80f883d89fd7e153 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sat, 12 Sep 2015 16:07:48 +0100 Subject: [PATCH] Added channel toString --- lib/channel.js | 2 +- src/channel.js | 2 +- test/bot.1.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/channel.js b/lib/channel.js index dfb4f72d8..79bc71b55 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -64,7 +64,7 @@ var Channel = (function () { }, { key: "toString", value: function toString() { - return "#" + this.name; + return "<#" + this.id + ">"; } }, { key: "client", diff --git a/src/channel.js b/src/channel.js index 0dc0b957a..d813e9b74 100644 --- a/src/channel.js +++ b/src/channel.js @@ -34,7 +34,7 @@ class Channel { } toString(){ - return "#" + this.name; + return "<#" + this.id + ">"; } get isPrivate(){ diff --git a/test/bot.1.js b/test/bot.1.js index f99314baa..38f25d390 100644 --- a/test/bot.1.js +++ b/test/bot.1.js @@ -17,7 +17,7 @@ mybot.on("message", function (message) { } // we can go ahead :) - mybot.sendMessage(message.author, message.sender.username); + mybot.reply(message, message.channel); }); mybot.on("ready", function () {