mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
small fixes to hb
This commit is contained in:
7
index.js
7
index.js
@@ -465,7 +465,7 @@ exports.Client.prototype.sendMessage = function( destination, toSend, callback,
|
||||
channel_id = destination.channel.id;
|
||||
} else if ( destination instanceof User ) {
|
||||
var destId = self.PMList.deepFilter( [ "user", "id" ], destination.id, true );
|
||||
|
||||
|
||||
if ( destId ) {
|
||||
channel_id = destId.id;
|
||||
} else {
|
||||
@@ -532,6 +532,11 @@ exports.Client.prototype.getChannelLogs = function( channel, amount, callback )
|
||||
|
||||
Internal.XHR.getChannelLogs( self.token, channel.id, ( amount || 50 ), function( err, data ) {
|
||||
|
||||
if(err){
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
|
||||
var logs = new List( "id" );
|
||||
for ( message of data ) {
|
||||
logs.add( new Message( message, channel ) );
|
||||
|
||||
Reference in New Issue
Block a user