mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
fix(typings): for intents (#3860)
* re-introduce Intents export * properly type WebsocketOptions#intents
This commit is contained in:
14
typings/index.d.ts
vendored
14
typings/index.d.ts
vendored
@@ -980,6 +980,14 @@ declare module 'discord.js' {
|
|||||||
public sync(): Promise<Integration>;
|
public sync(): Promise<Integration>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
export class Invite extends Base {
|
export class Invite extends Base {
|
||||||
constructor(client: Client, data: object);
|
constructor(client: Client, data: object);
|
||||||
public channel: GuildChannel | PartialGroupDMChannel;
|
public channel: GuildChannel | PartialGroupDMChannel;
|
||||||
@@ -2518,8 +2526,8 @@ declare module 'discord.js' {
|
|||||||
permissionOverwrites?: OverwriteResolvable[] | Collection<Snowflake, OverwriteResolvable>;
|
permissionOverwrites?: OverwriteResolvable[] | Collection<Snowflake, OverwriteResolvable>;
|
||||||
topic?: string;
|
topic?: string;
|
||||||
type?: Exclude<
|
type?: Exclude<
|
||||||
keyof typeof ChannelType | ChannelType,
|
keyof typeof ChannelType | ChannelType,
|
||||||
'dm' | 'group' | 'unknown' | ChannelType.dm | ChannelType.group | ChannelType.unknown
|
'dm' | 'group' | 'unknown' | ChannelType.dm | ChannelType.group | ChannelType.unknown
|
||||||
>;
|
>;
|
||||||
nsfw?: boolean;
|
nsfw?: boolean;
|
||||||
parent?: ChannelResolvable;
|
parent?: ChannelResolvable;
|
||||||
@@ -3002,7 +3010,7 @@ declare module 'discord.js' {
|
|||||||
interface WebSocketOptions {
|
interface WebSocketOptions {
|
||||||
large_threshold?: number;
|
large_threshold?: number;
|
||||||
compress?: boolean;
|
compress?: boolean;
|
||||||
intents?: Intents | number;
|
intents?: BitFieldResolvable<IntentsString> | number;
|
||||||
}
|
}
|
||||||
|
|
||||||
type WSEventType =
|
type WSEventType =
|
||||||
|
|||||||
Reference in New Issue
Block a user