diff --git a/examples/pingpong.js b/examples/pingpong.js index 800029288..51a2664e3 100644 --- a/examples/pingpong.js +++ b/examples/pingpong.js @@ -27,6 +27,6 @@ myBot.on( "message", function( message ) { if ( message.content === "ping" ) { // Send a message ("pong") to the channel the message was sent in, // which is accessed by message.channel. - this.sendMessage( message.channel, "pong" ); + this.sendMessage( message, "pong" ); } } ); diff --git a/index.js b/index.js index 7c86e39ff..9b338c7cd 100644 --- a/index.js +++ b/index.js @@ -969,7 +969,8 @@ exports.Client.prototype.getServer = function( id ) { } exports.Client.prototype.getChannel = function( id ) { - return this.getChannels().filter( "id", id, true ); + var normalChan = this.getChannels().filter( "id", id, true ); + return normalChan || this.PMList.filter("id", id, true); } exports.Client.prototype.getUser = function( id ) { diff --git a/package.json b/package.json index 61fff153e..97e8e278b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "discord.js", - "version": "2.6.7", + "version": "2.6.8", "description": "A way to interface with the Discord API", "main": "index.js", "scripts": {