mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
feat(Guild): add support for system channel flags (#3793)
This commit is contained in:
31
src/util/SystemChannelFlags.js
Normal file
31
src/util/SystemChannelFlags.js
Normal file
@@ -0,0 +1,31 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user