Skip to content

Commit

Permalink
fix(discord: commands): fix clean: change to msg.channel.messages.fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
dsevillamartin committed Sep 9, 2017
1 parent c3e1f1c commit f5810b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Discord/Commands/Clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class CleanCommand extends Command {
}

run(msg, args) {
let messageCount = args[0] && !isNaN(args[0]) ? Number(args[0]) : 10;
const messageCount = args[0] && !isNaN(args[0]) ? Number(args[0]) : 10;

msg.channel.fetchMessages({
return msg.channel.messages.fetch({
limit: 50,
}).then(messages => {
let msgs = messages.filter(e => e.author.equals(this.bot.user));
Expand Down

0 comments on commit f5810b8

Please sign in to comment.