mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 18:05:01 +02:00
Prune Error Catch
This commit is contained in:
@@ -44,10 +44,11 @@ module.exports = class PruneCommand extends commando.Command {
|
|||||||
let messages = await message.channel.fetchMessages({
|
let messages = await message.channel.fetchMessages({
|
||||||
limit: count
|
limit: count
|
||||||
});
|
});
|
||||||
message.channel.bulkDelete(messages, true);
|
let deletion = await message.channel.bulkDelete(messages, true);
|
||||||
|
return deletion;
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
return message.say(':x: Error! Something went wrong!');
|
return message.say(':x: Error! Something went wrong! Perhaps there are not enough messages in the channel from earlier than two weeks?');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user