forked from discordjs/discord.js
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: user flags * fix: unnecessary negated statement * fix: wording for description * fix: an vs. a * feat: add verified bot and dev flags Co-Authored-By: Vlad Frangu <kingdgrizzle@gmail.com> * typings :verified bot and dev flags Co-Authored-By: Vlad Frangu <kingdgrizzle@gmail.com> * feat: mon's suggestion, async fetchFlags & jsdoc * feat: added to index.js * fix: typo * style: leveled flags * typings: update leveled flags Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
- Loading branch information
1 parent
72a33cb
commit 2e5a647
Showing
4 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
'use strict'; | ||
const BitField = require('./BitField'); | ||
|
||
/** | ||
* Data structure that makes it easy to interact with a {@link User#flags} bitfield. | ||
* @extends {BitField} | ||
*/ | ||
class UserFlags extends BitField {} | ||
|
||
/** | ||
* @name UserFlags | ||
* @kind constructor | ||
* @memberof UserFlags | ||
* @param {BitFieldResolvable} [bits=0] Bit(s) to read from | ||
*/ | ||
|
||
/** | ||
* Numeric user flags. All available properties: | ||
* * `DISCORD_EMPLOYEE` | ||
* * `DISCORD_PARTNER` | ||
* * `HYPESQUAD_EVENTS` | ||
* * `BUGHUNTER_LEVEL_1` | ||
* * `HOUSE_BRAVERY` | ||
* * `HOUSE_BRILLIANCE` | ||
* * `HOUSE_BALANCE` | ||
* * `EARLY_SUPPORTER` | ||
* * `TEAM_USER` | ||
* * `SYSTEM` | ||
* * `BUGHUNTER_LEVEL_2` | ||
* * `VERIFIED_BOT` | ||
* * `VERIFIED_DEVELOPER` | ||
* @type {Object} | ||
* @see {@link https://discordapp.com/developers/docs/resources/user#user-object-user-flags} | ||
*/ | ||
UserFlags.FLAGS = { | ||
DISCORD_EMPLOYEE: 1 << 0, | ||
DISCORD_PARTNER: 1 << 1, | ||
HYPESQUAD_EVENTS: 1 << 2, | ||
BUGHUNTER_LEVEL_1: 1 << 3, | ||
HOUSE_BRAVERY: 1 << 6, | ||
HOUSE_BRILLIANCE: 1 << 7, | ||
HOUSE_BALANCE: 1 << 8, | ||
EARLY_SUPPORTER: 1 << 9, | ||
TEAM_USER: 1 << 10, | ||
SYSTEM: 1 << 12, | ||
BUGHUNTER_LEVEL_2: 1 << 14, | ||
VERIFIED_BOT: 1 << 16, | ||
VERIFIED_DEVELOPER: 1 << 17, | ||
}; | ||
|
||
module.exports = UserFlags; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters