mirror of
https://github.com/danbulant/discord.js
synced 2026-06-07 16:52:16 +00:00
Merge branch 'master' into hydrabot
This commit is contained in:
commit
0a278a32f3
1 changed files with 15 additions and 0 deletions
15
index.js
15
index.js
|
|
@ -9,6 +9,15 @@ var Invite = require( "./lib/invite.js" ).Invite;
|
||||||
var PMChannel = require( "./lib/PMChannel.js" ).PMChannel;
|
var PMChannel = require( "./lib/PMChannel.js" ).PMChannel;
|
||||||
var WebSocket = require( 'ws' );
|
var WebSocket = require( 'ws' );
|
||||||
|
|
||||||
|
exports.Endpoints = Endpoints;
|
||||||
|
exports.Server = Server;
|
||||||
|
exports.Message = Message;
|
||||||
|
exports.User = User;
|
||||||
|
exports.Channel = Channel;
|
||||||
|
exports.List = List;
|
||||||
|
exports.Invite = Invite;
|
||||||
|
exports.PMChannel = PMChannel;
|
||||||
|
|
||||||
exports.isUserID = function(id){
|
exports.isUserID = function(id){
|
||||||
return ((id + "").length === 17 && !isNaN(id));
|
return ((id + "").length === 17 && !isNaN(id));
|
||||||
}
|
}
|
||||||
|
|
@ -479,6 +488,12 @@ exports.Client.prototype.channelFromId = function( id ) {
|
||||||
var channelList = this.serverList.concatSublists( "channels", "id" );
|
var channelList = this.serverList.concatSublists( "channels", "id" );
|
||||||
var channel = channelList.filter( "id", id, true );
|
var channel = channelList.filter( "id", id, true );
|
||||||
|
|
||||||
|
if(!channel){
|
||||||
|
|
||||||
|
channel = this.PMList.filter( "id", id, true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return channel;
|
return channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue