mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Handle unavailable guild, fix default getChannelLogs limit
This commit is contained in:
@@ -167,12 +167,17 @@ export default class Client extends EventEmitter {
|
||||
}
|
||||
|
||||
// def getChannelLogs
|
||||
getChannelLogs(where, limit = 500, options = {}, callback = (/*err, logs*/) => { }) {
|
||||
getChannelLogs(where, limit = 50, options = {}, callback = (/*err, logs*/) => { }) {
|
||||
if (typeof options === "function") {
|
||||
// options is the callback
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
else if (typeof limit === "function") {
|
||||
// options is the callback
|
||||
callback = limit;
|
||||
limit = 50;
|
||||
}
|
||||
|
||||
return this.internal.getChannelLogs(where, limit, options)
|
||||
.then(dataCallback(callback), errorCallback(callback));
|
||||
|
||||
Reference in New Issue
Block a user