summaryrefslogtreecommitdiff
path: root/node_modules/discord.js/src/util/IntentsBitField.js
blob: ea908b6017575a70e30111c85c1f0191abda7aa9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
'use strict';
const { GatewayIntentBits } = require('discord-api-types/v10');
const BitField = require('./BitField');

/**
 * Data structure that makes it easy to calculate intents.
 * @extends {BitField}
 */
class IntentsBitField extends BitField {
  /**
   * Numeric WebSocket intents
   * @type {GatewayIntentBits}
   * @memberof IntentsBitField
   */
  static Flags = GatewayIntentBits;
}

/**
 * @name IntentsBitField
 * @kind constructor
 * @memberof IntentsBitField
 * @param {IntentsResolvable} [bits=0] Bit(s) to read from
 */

/**
 * Data that can be resolved to give a permission number. This can be:
 * * A string (see {@link IntentsBitField.Flags})
 * * An intents flag
 * * An instance of {@link IntentsBitField}
 * * An array of IntentsResolvable
 * @typedef {string|number|IntentsBitField|IntentsResolvable[]} IntentsResolvable
 */

module.exports = IntentsBitField;