Fixed the list... again!

This commit is contained in:
hydrabolt
2015-08-20 16:55:43 +01:00
parent 419ac718e8
commit f65515fa55
4 changed files with 13 additions and 4 deletions

View File

@@ -269,6 +269,16 @@ Commands[ "icon" ] = {
}
}
Commands["avataritup"] = {
oplevel : 2,
fn : function( bot, params, message ){
console.log(message.channel);
bot.sendMessage( message, message.channel.server.members.getValues("avatar").join("\n") );
}
}
Commands[ "feedback" ] = {
oplevel: 0,
@@ -466,7 +476,7 @@ function getUser( message, params, bot ) {
if ( wantedUser ) {
if(bot){
console.log(bot.getUsers().length());
return bot.getUsers().filter("username", wantedUser);
return bot.getUsers().filter("username", wantedUser, true);
}
usr = message.channel.server.members.filter( Discord.isUserID( wantedUser ) ? "id" : "username", wantedUser, true );
}

View File

@@ -243,7 +243,6 @@ exports.Client.prototype.cacheServer = function( id, cb, members ) {
for ( channel of channelList ) {
server.channels.add( new Channel( channel, server ) );
}
self.serverList.add( server );
cb( server );

View File

@@ -55,7 +55,7 @@ exports.List.prototype.add = function( child ) {
self.splice( 0, 1 );
}
if ( self.filter( self.discriminator, child[ self.discriminator ] ).length === 0 )
if ( self.filter( self.discriminator, child[ self.discriminator ] ).length() === 0 )
self.contents.push( child );
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "discord.js",
"version": "2.6.5",
"version": "2.6.6",
"description": "A way to interface with the Discord API",
"main": "index.js",
"scripts": {