mirror of
https://github.com/danbulant/discord.js
synced 2026-06-06 00:02:52 +00:00
getChannelLogs now returns actual error instead of empty List
This commit is contained in:
parent
b35763a0c9
commit
a7e9fcc2cd
1 changed files with 3 additions and 3 deletions
6
index.js
6
index.js
|
|
@ -462,8 +462,8 @@ exports.Client.prototype.getChannelLogs = function( channel, amount, cb ) {
|
||||||
.set( "authorization", client.token )
|
.set( "authorization", client.token )
|
||||||
.end( function( err, res ) {
|
.end( function( err, res ) {
|
||||||
|
|
||||||
if ( err ) {
|
if ( !res.ok ) {
|
||||||
cb( new List( "id" ) );
|
cb( err );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -473,7 +473,7 @@ exports.Client.prototype.getChannelLogs = function( channel, amount, cb ) {
|
||||||
datList.add( new Message( item, channel ) );
|
datList.add( new Message( item, channel ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
cb( datList );
|
cb( null, datList );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue