mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
fix(ThreadManager): Respect cache and force in fetching (#9239)
* fix(ThreadManager): Respect `cache` and `force` in fetching * refactor: remove defaults These are already defaulted down the line. --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -93,10 +93,10 @@ class ThreadManager extends CachedManager {
|
||||
* .then(channel => console.log(channel.name))
|
||||
* .catch(console.error);
|
||||
*/
|
||||
fetch(options, { cache = true, force = false } = {}) {
|
||||
fetch(options, { cache, force } = {}) {
|
||||
if (!options) return this.fetchActive(cache);
|
||||
const channel = this.client.channels.resolveId(options);
|
||||
if (channel) return this.client.channels.fetch(channel, cache, force);
|
||||
if (channel) return this.client.channels.fetch(channel, { cache, force });
|
||||
if (options.archived) {
|
||||
return this.fetchArchived(options.archived, cache);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user