Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat(Role): add flags (#9694)
Co-authored-by: n1ck_pro <59617443+N1ckPro@users.noreply.github.com>
- Loading branch information
1 parent
d0fd79c
commit a222e53
Showing
4 changed files
with
68 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,37 @@ | ||
'use strict'; | ||
|
||
const BitField = require('./BitField'); | ||
|
||
/** | ||
* Data structure that makes it easy to interact with an {@link GuildMember#flags} bitfield. | ||
* @extends {BitField} | ||
*/ | ||
class RoleFlags extends BitField {} | ||
|
||
/** | ||
* @name RoleFlags | ||
* @kind constructor | ||
* @memberof RoleFlags | ||
* @param {BitFieldResolvable} [bits=0] Bit(s) to read from | ||
*/ | ||
|
||
/** | ||
* Numeric guild member flags. All available properties: | ||
* * `IN_PROMPT` | ||
* @type {Object} | ||
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object-role-flags} | ||
*/ | ||
RoleFlags.FLAGS = { | ||
IN_PROMPT: 1 << 0, | ||
}; | ||
|
||
/** | ||
* Data that can be resolved to give a role flag bitfield. This can be: | ||
* * A string (see {@link RoleFlags.FLAGS}) | ||
* * A role flag | ||
* * An instance of RoleFlags | ||
* * An Array of RoleFlagsResolvable | ||
* @typedef {string|number|RoleFlags|RoleFlagsResolvable[]} RoleFlagsResolvable | ||
*/ | ||
|
||
module.exports = RoleFlags; |
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