UserFlags.js (1191B)
1 'use strict'; 2 const BitField = require('./BitField'); 3 4 /** 5 * Data structure that makes it easy to interact with a {@link User#flags} bitfield. 6 * @extends {BitField} 7 */ 8 class UserFlags extends BitField {} 9 10 /** 11 * @name UserFlags 12 * @kind constructor 13 * @memberof UserFlags 14 * @param {BitFieldResolvable} [bits=0] Bit(s) to read from 15 */ 16 17 /** 18 * Numeric user flags. All available properties: 19 * * `DISCORD_EMPLOYEE` 20 * * `DISCORD_PARTNER` 21 * * `HYPESQUAD_EVENTS` 22 * * `BUGHUNTER_LEVEL_1` 23 * * `HOUSE_BRAVERY` 24 * * `HOUSE_BRILLIANCE` 25 * * `HOUSE_BALANCE` 26 * * `EARLY_SUPPORTER` 27 * * `TEAM_USER` 28 * * `SYSTEM` 29 * * `BUGHUNTER_LEVEL_2` 30 * * `VERIFIED_BOT` 31 * * `VERIFIED_DEVELOPER` 32 * @type {Object} 33 * @see {@link https://discordapp.com/developers/docs/resources/user#user-object-user-flags} 34 */ 35 UserFlags.FLAGS = { 36 DISCORD_EMPLOYEE: 1 << 0, 37 DISCORD_PARTNER: 1 << 1, 38 HYPESQUAD_EVENTS: 1 << 2, 39 BUGHUNTER_LEVEL_1: 1 << 3, 40 HOUSE_BRAVERY: 1 << 6, 41 HOUSE_BRILLIANCE: 1 << 7, 42 HOUSE_BALANCE: 1 << 8, 43 EARLY_SUPPORTER: 1 << 9, 44 TEAM_USER: 1 << 10, 45 SYSTEM: 1 << 12, 46 BUGHUNTER_LEVEL_2: 1 << 14, 47 VERIFIED_BOT: 1 << 16, 48 VERIFIED_DEVELOPER: 1 << 17, 49 }; 50 51 module.exports = UserFlags;