Add some UserFlags (Undocument)

This commit is contained in:
March 7th 2022-06-04 14:00:20 +07:00
parent 26f56f1650
commit b0172e6b51
3 changed files with 20 additions and 1 deletions

View File

@ -231,6 +231,9 @@ class ThreadManager extends CachedManager {
* @returns {Promise<FetchedThreads>}
*/
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 });
}

View File

@ -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;