fix(TextBasedChannel): bulkDelete should not return non-Promise

This commit is contained in:
Lewdcario
2018-06-29 17:32:56 -05:00
parent 7ce1d1642c
commit 72346fb47e

View File

@@ -454,7 +454,7 @@ class TextBasedChannel {
if (filterOld) {
messages = messages.filter(m => Date.now() - Snowflake.deconstruct(m.id).date.getTime() < 1209600000);
}
if (messages.length === 0) return new Collection();
if (messages.length === 0) return Promise.resolve(new Collection());
if (messages.length === 1) {
return messages[0].delete().then(() => new Collection([[messages[0].id, messages[0]]]));
}