mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Datastore cleanup (#1892)
* Start Store cleanup * wip store cleanup * fix iterables initiating datastores * handle the possibility of a datastore with no holds and no its own 'create' method * more cleanup (instances that need more than just client/data) * missed RoleStore extras * not sure how eslint didn't catch that tab... * avoid re-getting the channel we already have... * cleanup resolvers and refactor them into DataStores * ^ * and remove * fix some bugs * fix lint * fix documentation maybe? * formatting * fix presences * really fix presences this time * bad fix was bad... let;s see how bad this one is.. * forgot to save a file * make presence resolving take userresolveables too * fix tabs in jsdocs * fix bad fix from last night that caused issues, with better fix... * oops
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
const path = require('path');
|
||||
const MessageCollector = require('../MessageCollector');
|
||||
const Shared = require('../shared');
|
||||
const MessageStore = require('../../stores/MessageStore');
|
||||
const Snowflake = require('../../util/Snowflake');
|
||||
const Collection = require('../../util/Collection');
|
||||
const DataResolver = require('../../util/DataResolver');
|
||||
const MessageAttachment = require('../../structures/MessageAttachment');
|
||||
const MessageEmbed = require('../../structures/MessageEmbed');
|
||||
const { RangeError, TypeError } = require('../../errors');
|
||||
@@ -124,7 +124,7 @@ class TextBasedChannel {
|
||||
}
|
||||
|
||||
return Promise.all(options.files.map(file =>
|
||||
this.client.resolver.resolveFile(file.attachment).then(resource => {
|
||||
DataResolver.resolveFile(file.attachment, this.client.browser).then(resource => {
|
||||
file.file = resource;
|
||||
return file;
|
||||
})
|
||||
@@ -341,3 +341,6 @@ class TextBasedChannel {
|
||||
}
|
||||
|
||||
module.exports = TextBasedChannel;
|
||||
|
||||
// Fixes Circular
|
||||
const MessageStore = require('../../stores/MessageStore');
|
||||
|
||||
Reference in New Issue
Block a user