mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Fixed DataStore, deprecation leftovers and a bit of Event Constants (#1841)
* Fixed leftover fetchThing and removed unused methods/error messages * Added resume event constant and used event constants wherever possible * Replaced mentions of removed method name with their new name. * Fixed typo: resume -> resumed
This commit is contained in:
@@ -245,8 +245,8 @@ class TextBasedChannel {
|
||||
*/
|
||||
|
||||
/**
|
||||
* Similar to createCollector but in promise form. Resolves with a collection of messages that pass the specified
|
||||
* filter.
|
||||
* Similar to createMessageCollector but in promise form.
|
||||
* Resolves with a collection of messages that pass the specified filter.
|
||||
* @param {CollectorFilter} filter The filter function to use
|
||||
* @param {AwaitMessagesOptions} [options={}] Optional options to pass to the internal collector
|
||||
* @returns {Promise<Collection<Snowflake, Message>>}
|
||||
@@ -279,7 +279,9 @@ class TextBasedChannel {
|
||||
* @returns {Promise<Collection<Snowflake, Message>>} Deleted messages
|
||||
*/
|
||||
bulkDelete(messages, filterOld = false) {
|
||||
if (!isNaN(messages)) return this.fetchMessages({ limit: messages }).then(msgs => this.bulkDelete(msgs, filterOld));
|
||||
if (!isNaN(messages)) {
|
||||
return this.messages.fetch({ limit: messages }).then(msgs => this.bulkDelete(msgs, filterOld));
|
||||
}
|
||||
if (messages instanceof Array || messages instanceof Collection) {
|
||||
let messageIDs = messages instanceof Collection ? messages.keyArray() : messages.map(m => m.id);
|
||||
if (filterOld) {
|
||||
|
||||
Reference in New Issue
Block a user