diff --git a/src/managers/ThreadManager.js b/src/managers/ThreadManager.js index 0568c6c..fc0a4b3 100644 --- a/src/managers/ThreadManager.js +++ b/src/managers/ThreadManager.js @@ -231,6 +231,9 @@ class ThreadManager extends CachedManager { * @returns {Promise} */ async fetchActive(cache = true) { + if (!this.client.user.bot) { + throw new Error('INVALID_USER_METHOD: User accounts cannot use this method\nI will fix it .-.'); + } const raw = await this.client.api.guilds(this.channel.guild.id).threads.active.get(); return this.constructor._mapThreads(raw, this.client, { parent: this.channel, cache }); } diff --git a/src/util/UserFlags.js b/src/util/UserFlags.js index 5849750..1d51148 100644 --- a/src/util/UserFlags.js +++ b/src/util/UserFlags.js @@ -38,22 +38,38 @@ class UserFlags extends BitField {} * * `BOT_HTTP_INTERACTIONS` * @type {Object} * @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags} + * @see {@link https://github.com/LewisTehMinerz/discord-flags} */ UserFlags.FLAGS = { DISCORD_EMPLOYEE: 1 << 0, PARTNERED_SERVER_OWNER: 1 << 1, HYPESQUAD_EVENTS: 1 << 2, BUGHUNTER_LEVEL_1: 1 << 3, + MFA_SMS: 1 << 4, // [Undocumented] User has SMS 2FA enabled. + PREMIUM_PROMO_DISMISSED: 1 << 5, // [Undocumented] Presumably some sort of Discord Nitro promotion that the user dismissed. HOUSE_BRAVERY: 1 << 6, HOUSE_BRILLIANCE: 1 << 7, HOUSE_BALANCE: 1 << 8, EARLY_SUPPORTER: 1 << 9, TEAM_USER: 1 << 10, + INTERNAL_APPLICATION: 1 << 11, // [Undocumented] An internal flag accidentally leaked to the client's private flags. Relates to partner/verification applications but nothing else is known. + SYSTEM: 1 << 12, // [Undocumented] Account is a Discord system account. + HAS_UNREAD_URGENT_MESSAGES: 1 << 13, // [Undocumented] User has unread messages from Discord. BUGHUNTER_LEVEL_2: 1 << 14, + UNDERAGE_DELETED: 1 << 15, // [Undocumented] Unused. User was deleted for being underage. VERIFIED_BOT: 1 << 16, EARLY_VERIFIED_BOT_DEVELOPER: 1 << 17, DISCORD_CERTIFIED_MODERATOR: 1 << 18, BOT_HTTP_INTERACTIONS: 1 << 19, + SPAMMER: 1 << 20, + DISABLE_PREMIUM: 1 << 21, // [Undocumented] Forcefully disables Nitro features. + PREMIUM_DISCRIMINATOR: 1 << 37, // [Undocumented] User has a premium discriminator. + /* Presence Flags */ + USED_DESKTOP_CLIENT: 1 << 38, // [Undocumented] User has used the desktop client. + USED_WEB_CLIENT: 1 << 39, // [Undocumented] User has used the web client. + USED_MOBILE_CLIENT: 1 << 40, // [Undocumented] User has used the mobile client. + DISABLED: 1 << 41, // [Undocumented] User is currently temporarily or permanently disabled. + VERIFIED_EMAIL: 1 << 43, // [Undocumented] User has a verified email on their account. }; module.exports = UserFlags; diff --git a/typings/index.d.ts b/typings/index.d.ts index 144086e..6ecdba9 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -3173,7 +3173,7 @@ export class ApplicationCommandManager< ApplicationCommandScope = ApplicationCommand<{ guild: GuildResolvable }>, PermissionsOptionsExtras = { guild: GuildResolvable }, PermissionsGuildType = null, -> extends CachedManager { +> extends CachedManager { // @ts-ignore protected constructor(client: Client, iterable?: Iterable, user: User); public permissions: ApplicationCommandPermissionsManager<