mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat(Guild): add includeApplications option for fetchIntegrations (#4762)
This commit is contained in:
52
typings/index.d.ts
vendored
52
typings/index.d.ts
vendored
@@ -94,6 +94,21 @@ declare module 'discord.js' {
|
||||
public split(): APIMessage[];
|
||||
}
|
||||
|
||||
export abstract class Application {
|
||||
constructor(client: Client, data: object);
|
||||
public readonly createdAt: Date;
|
||||
public readonly createdTimestamp: number;
|
||||
public description: string;
|
||||
public icon: string;
|
||||
public id: Snowflake;
|
||||
public name: string;
|
||||
public coverImage(options?: ImageURLOptions): string;
|
||||
public fetchAssets(): Promise<ApplicationAsset[]>;
|
||||
public iconURL(options?: ImageURLOptions): string;
|
||||
public toJSON(): object;
|
||||
public toString(): string;
|
||||
}
|
||||
|
||||
export class Base {
|
||||
constructor(client: Client);
|
||||
public readonly client: Client;
|
||||
@@ -229,24 +244,12 @@ declare module 'discord.js' {
|
||||
public removeAllListeners<S extends string | symbol>(event?: Exclude<S, keyof ClientEvents>): this;
|
||||
}
|
||||
|
||||
export class ClientApplication extends Base {
|
||||
constructor(client: Client, data: object);
|
||||
export class ClientApplication extends Application {
|
||||
public botPublic: boolean | null;
|
||||
public botRequireCodeGrant: boolean | null;
|
||||
public cover: string | null;
|
||||
public readonly createdAt: Date;
|
||||
public readonly createdTimestamp: number;
|
||||
public description: string;
|
||||
public icon: string;
|
||||
public id: Snowflake;
|
||||
public name: string;
|
||||
public owner: User | Team | null;
|
||||
public rpcOrigins: string[];
|
||||
public coverImage(options?: ImageURLOptions): string;
|
||||
public fetchAssets(): Promise<ClientApplicationAsset[]>;
|
||||
public iconURL(options?: ImageURLOptions): string;
|
||||
public toJSON(): object;
|
||||
public toString(): string;
|
||||
}
|
||||
|
||||
export class ClientUser extends User {
|
||||
@@ -690,7 +693,7 @@ declare module 'discord.js' {
|
||||
public fetchBan(user: UserResolvable): Promise<{ user: User; reason: string }>;
|
||||
public fetchBans(): Promise<Collection<Snowflake, { user: User; reason: string }>>;
|
||||
public fetchEmbed(): Promise<GuildWidget>;
|
||||
public fetchIntegrations(): Promise<Collection<string, Integration>>;
|
||||
public fetchIntegrations(options?: FetchIntegrationsOptions): Promise<Collection<string, Integration>>;
|
||||
public fetchInvites(): Promise<Collection<string, Invite>>;
|
||||
public fetchPreview(): Promise<GuildPreview>;
|
||||
public fetchVanityCode(): Promise<string>;
|
||||
@@ -915,6 +918,7 @@ declare module 'discord.js' {
|
||||
export class Integration extends Base {
|
||||
constructor(client: Client, data: object, guild: Guild);
|
||||
public account: IntegrationAccount;
|
||||
public application: IntegrationApplication | null;
|
||||
public enabled: boolean;
|
||||
public expireBehavior: number;
|
||||
public expireGracePeriod: number;
|
||||
@@ -931,6 +935,10 @@ declare module 'discord.js' {
|
||||
public sync(): Promise<Integration>;
|
||||
}
|
||||
|
||||
export class IntegrationApplication extends Application {
|
||||
public bot: User | null;
|
||||
}
|
||||
|
||||
export class Intents extends BitField<IntentsString> {
|
||||
public static FLAGS: Record<IntentsString, number>;
|
||||
public static PRIVILEGED: number;
|
||||
@@ -2175,6 +2183,12 @@ declare module 'discord.js' {
|
||||
|
||||
type APIMessageContentResolvable = string | number | boolean | bigint | symbol | readonly StringResolvable[];
|
||||
|
||||
interface ApplicationAsset {
|
||||
name: string;
|
||||
id: Snowflake;
|
||||
type: 'BIG' | 'SMALL';
|
||||
}
|
||||
|
||||
interface AuditLogChange {
|
||||
key: string;
|
||||
old?: any;
|
||||
@@ -2239,12 +2253,6 @@ declare module 'discord.js' {
|
||||
|
||||
type ChannelResolvable = Channel | Snowflake;
|
||||
|
||||
interface ClientApplicationAsset {
|
||||
name: string;
|
||||
id: Snowflake;
|
||||
type: 'BIG' | 'SMALL';
|
||||
}
|
||||
|
||||
interface ClientEvents {
|
||||
channelCreate: [Channel];
|
||||
channelDelete: [Channel | PartialDMChannel];
|
||||
@@ -2453,6 +2461,10 @@ declare module 'discord.js' {
|
||||
User: typeof User;
|
||||
}
|
||||
|
||||
interface FetchIntegrationsOptions {
|
||||
includeApplications?: boolean;
|
||||
}
|
||||
|
||||
interface FetchMemberOptions {
|
||||
user: UserResolvable;
|
||||
cache?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user