Added method to test whether string is ID

This commit is contained in:
hydrabolt
2015-08-14 12:38:49 +01:00
parent a0d4fa930c
commit a6bcb7befb

View File

@@ -9,6 +9,10 @@ var Invite = require( "./lib/invite.js" ).Invite;
var PMChannel = require( "./lib/PMChannel.js" ).PMChannel;
var WebSocket = require( 'ws' );
exports.prototype.isUserID = function(id){
return ((id + "").length === 17 && !isNaN(id));
}
exports.Client = function( options ) {
this.options = options || {};