-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Guild): add systemChannelFlags (#3559)
* Add systemChannelFlags bitfield to Guild * Implement @vladfrangu's suggestions * fix: apply suggestions, reverse order of flags, reword docs * docs: add SystemCHannelFlagsResolvable typedef Co-authored-by: SpaceEEC <[email protected]>
- Loading branch information
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,33 @@ | ||
'use strict'; | ||
|
||
const BitField = require('./BitField'); | ||
|
||
/** | ||
* Data structure that makes it easy to interact with a {@link Guild#systemChannelFlags} bitfield. | ||
* <info>Note that all event message types are enabled by default, | ||
* and by setting their corresponding flags you are disabling them</info> | ||
* @extends {BitField} | ||
*/ | ||
class SystemChannelFlags extends BitField { | ||
/** | ||
* Data that can be resolved to give a sytem channel flag bitfield. This can be: | ||
* * A string (see {@link SystemChannelFlags.FLAGS}) | ||
* * A sytem channel flag | ||
* * An instance of SystemChannelFlags | ||
* * An Array of SystemChannelFlagsResolvable | ||
* @typedef {string|number|SystemChannelFlags|SystemChannelFlagsResolvable[]} SystemChannelFlagsResolvable | ||
*/ | ||
} | ||
|
||
/** | ||
* Numeric system channel flags. All available properties: | ||
* * `WELCOME_MESSAGE_DISABLED` | ||
* * `BOOST_MESSAGE_DISABLED` | ||
* @type {Object} | ||
*/ | ||
SystemChannelFlags.FLAGS = { | ||
WELCOME_MESSAGE_DISABLED: 1 << 0, | ||
BOOST_MESSAGE_DISABLED: 1 << 1, | ||
}; | ||
|
||
module.exports = SystemChannelFlags; |
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