refactor(Intents): remove computed shorts (#6050)

This commit is contained in:
Souji
2021-07-05 17:07:30 +02:00
committed by GitHub
parent 28c57246d1
commit 3022b0f5b1
3 changed files with 1 additions and 23 deletions

View File

@@ -61,23 +61,4 @@ Intents.FLAGS = {
DIRECT_MESSAGE_TYPING: 1 << 14,
};
/**
* Bitfield representing all privileged intents
* @type {number}
* @see {@link https://discord.com/developers/docs/topics/gateway#privileged-intents}
*/
Intents.PRIVILEGED = Intents.FLAGS.GUILD_MEMBERS | Intents.FLAGS.GUILD_PRESENCES;
/**
* Bitfield representing all intents combined
* @type {number}
*/
Intents.ALL = Object.values(Intents.FLAGS).reduce((acc, p) => acc | p, 0);
/**
* Bitfield representing all non-privileged intents
* @type {number}
*/
Intents.NON_PRIVILEGED = Intents.ALL & ~Intents.PRIVILEGED;
module.exports = Intents;

3
typings/index.d.ts vendored
View File

@@ -804,9 +804,6 @@ export class IntegrationApplication extends Application {
export class Intents extends BitField<IntentsString> {
public static FLAGS: Record<IntentsString, number>;
public static PRIVILEGED: number;
public static ALL: number;
public static NON_PRIVILEGED: number;
public static resolve(bit?: BitFieldResolvable<IntentsString, number>): number;
}

View File

@@ -23,7 +23,7 @@ import {
} from '..';
const client: Client = new Client({
intents: Intents.NON_PRIVILEGED,
intents: Intents.FLAGS.GUILDS,
makeCache: Options.cacheWithLimits({
MessageManager: 200,
}),