mirror of
https://github.com/danbulant/discord.js
synced 2026-06-20 15:11:32 +00:00
Client now reworks with PM
This commit is contained in:
parent
369cdcd7de
commit
6ade919bc3
3 changed files with 4 additions and 3 deletions
|
|
@ -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" );
|
||||
}
|
||||
} );
|
||||
|
|
|
|||
3
index.js
3
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 ) {
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue