feat: disable client.acceptInvite()

This commit is contained in:
Elysia
2024-07-03 17:24:24 +07:00
parent 76dacc6041
commit 39496afcec
8 changed files with 83 additions and 56 deletions

View File

@@ -3,7 +3,6 @@
const process = require('node:process');
const { Collection } = require('@discordjs/collection');
const CachedManager = require('./CachedManager');
const ThreadManager = require('./ThreadManager');
const { Error, TypeError } = require('../errors');
const GuildChannel = require('../structures/GuildChannel');
const PermissionOverwrites = require('../structures/PermissionOverwrites');
@@ -468,21 +467,6 @@ class GuildChannelManager extends CachedManager {
}).guild;
}
/**
* Obtains all active thread channels in the guild from Discord
* @param {boolean} [cache=true] Whether to cache the fetched data
* @returns {Promise<FetchedThreads>}
* @example
* // Fetch all threads from the guild
* message.guild.channels.fetchActiveThreads()
* .then(fetched => console.log(`There are ${fetched.threads.size} threads.`))
* .catch(console.error);
*/
async fetchActiveThreads(cache = true) {
const raw = await this.client.api.guilds(this.guild.id).threads.active.get();
return ThreadManager._mapThreads(raw, this.client, { guild: this.guild, cache });
}
/**
* Deletes the channel.
* @param {GuildChannelResolvable} channel The channel to delete