Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(typings): for intents #3860

Merged
merged 1 commit into from
Feb 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,14 @@ declare module 'discord.js' {
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 {
constructor(client: Client, data: object);
public channel: GuildChannel | PartialGroupDMChannel;
Expand Down Expand Up @@ -2518,8 +2526,8 @@ declare module 'discord.js' {
permissionOverwrites?: OverwriteResolvable[] | Collection<Snowflake, OverwriteResolvable>;
topic?: string;
type?: Exclude<
keyof typeof ChannelType | ChannelType,
'dm' | 'group' | 'unknown' | ChannelType.dm | ChannelType.group | ChannelType.unknown
keyof typeof ChannelType | ChannelType,
'dm' | 'group' | 'unknown' | ChannelType.dm | ChannelType.group | ChannelType.unknown
>;
nsfw?: boolean;
parent?: ChannelResolvable;
Expand Down Expand Up @@ -3002,7 +3010,7 @@ declare module 'discord.js' {
interface WebSocketOptions {
large_threshold?: number;
compress?: boolean;
intents?: Intents | number;
intents?: BitFieldResolvable<IntentsString> | number;
}

type WSEventType =
Expand Down