feat: Guild Forum channel

https://github.com/discordjs/discord.js/pull/8651
This commit is contained in:
March 7th
2022-10-03 19:25:39 +07:00
parent 5e715fad5e
commit 2fb09d7da6
23 changed files with 821 additions and 120 deletions

45
src/util/ChannelFlags.js Normal file
View File

@@ -0,0 +1,45 @@
'use strict';
const BitField = require('./BitField');
/**
* Data structure that makes it easy to interact with a {@link BaseChannel#flags} bitfield.
* @extends {BitField}
*/
class ChannelFlags extends BitField {}
/**
* Numeric guild channel flags. All available properties:
* * `PINNED`
* * `REQUIRE_TAG`
* @type {Object}
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-flags}
*/
ChannelFlags.FLAGS = {
PINNED: 1 << 1,
REQUIRE_TAG: 1 << 4,
};
/**
* @name ChannelFlags
* @kind constructor
* @memberof ChannelFlags
* @param {BitFieldResolvable} [bits=0] Bit(s) to read from
*/
/**
* Bitfield of the packed bits
* @type {number}
* @name ChannelFlags#bitfield
*/
/**
* Data that can be resolved to give a channel flag bitfield. This can be:
* * A string (see {@link ChannelFlags.FLAGS})
* * A channel flag
* * An instance of ChannelFlags
* * An Array of ChannelFlags
* @typedef {string|number|ChannelFlags|ChannelFlagsResolvable[]} ChannelFlagsResolvable
*/
module.exports = ChannelFlags;