mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
feat: Intents bitfield (#3844)
* feat: Intents bitfield * suggestion: properly construct Intents.ALL * fix: actually document the ws option * suggestion: remove disabledEvents in favor of intents * suggestion: remove obsolete check, validate falsy values Co-Authored-By: SpaceEEC <spaceeec@yahoo.com> * fix: GUILD_BANS flag * fix: exception for intents check in ws options Co-Authored-By: SpaceEEC <spaceeec@yahoo.com> * docs: IntentsResolvable Co-Authored-By: SpaceEEC <spaceeec@yahoo.com> * Update Client.js Co-authored-by: SpaceEEC <spaceeec@yahoo.com> Co-authored-by: Crawl <icrawltogo@gmail.com>
This commit is contained in:
19
typings/index.d.ts
vendored
19
typings/index.d.ts
vendored
@@ -2298,7 +2298,6 @@ declare module 'discord.js' {
|
||||
restSweepInterval?: number;
|
||||
retryLimit?: number;
|
||||
presence?: PresenceData;
|
||||
disabledEvents?: WSEventType[];
|
||||
ws?: WebSocketOptions;
|
||||
http?: HTTPOptions;
|
||||
}
|
||||
@@ -2631,6 +2630,23 @@ declare module 'discord.js' {
|
||||
name: string;
|
||||
}
|
||||
|
||||
type IntentsString =
|
||||
| 'GUILDS'
|
||||
| 'GUILD_MEMBERS'
|
||||
| 'GUILD_BANS'
|
||||
| 'GUILD_EMOJIS'
|
||||
| 'GUILD_INTEGRATIONS'
|
||||
| 'GUILD_WEBHOOKS'
|
||||
| 'GUILD_INVITES'
|
||||
| 'GUILD_VOICE_STATES'
|
||||
| 'GUILD_PRESENCES'
|
||||
| 'GUILD_MESSAGES'
|
||||
| 'GUILD_MESSAGE_REACTIONS'
|
||||
| 'GUILD_MESSAGE_TYPING'
|
||||
| 'DIRECT_MESSAGES'
|
||||
| 'DIRECT_MESSAGE_REACTIONS'
|
||||
| 'DIRECT_MESSAGE_TYPING';
|
||||
|
||||
interface InviteOptions {
|
||||
temporary?: boolean;
|
||||
maxAge?: number;
|
||||
@@ -2986,6 +3002,7 @@ declare module 'discord.js' {
|
||||
interface WebSocketOptions {
|
||||
large_threshold?: number;
|
||||
compress?: boolean;
|
||||
intents?: Intents | number;
|
||||
}
|
||||
|
||||
type WSEventType =
|
||||
|
||||
Reference in New Issue
Block a user