Skip to content

Commit

Permalink
Make purgeChannel use getMessages options (#1236)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsian03 authored Jul 5, 2021
1 parent 24d84a9 commit 15546c4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2393,7 +2393,11 @@ class Client extends EventEmitter {
}
};
const del = async (_before, _after) => {
const messages = await this.getMessages(channelID, 100, _before, _after);
const messages = await this.getMessages(channelID, {
limit: 100,
before: _before,
after: _after
});
if(limit !== -1 && limit <= 0) {
done = true;
return;
Expand Down

0 comments on commit 15546c4

Please sign in to comment.