mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +01:00
feat(Application): application flags (#5147)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com> Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
35
typings/index.d.ts
vendored
35
typings/index.d.ts
vendored
@@ -104,15 +104,20 @@ declare module 'discord.js' {
|
||||
constructor(client: Client, data: object);
|
||||
public readonly createdAt: Date;
|
||||
public readonly createdTimestamp: number;
|
||||
public description: string;
|
||||
public icon: string;
|
||||
public description: string | null;
|
||||
public icon: string | null;
|
||||
public id: Snowflake;
|
||||
public name: string;
|
||||
public coverImage(options?: ImageURLOptions): string;
|
||||
public name: string | null;
|
||||
public coverImage(options?: ImageURLOptions): string | null;
|
||||
public fetchAssets(): Promise<ApplicationAsset[]>;
|
||||
public iconURL(options?: ImageURLOptions): string;
|
||||
public iconURL(options?: ImageURLOptions): string | null;
|
||||
public toJSON(): object;
|
||||
public toString(): string;
|
||||
public toString(): string | null;
|
||||
}
|
||||
|
||||
export class ApplicationFlags extends BitField<ApplicationFlagsString> {
|
||||
public static FLAGS: Record<ApplicationFlagsString, number>;
|
||||
public static resolve(bit?: BitFieldResolvable<ApplicationFlagsString, number>): number;
|
||||
}
|
||||
|
||||
export class Base {
|
||||
@@ -203,6 +208,7 @@ declare module 'discord.js' {
|
||||
private _eval(script: string): any;
|
||||
private _validateOptions(options: ClientOptions): void;
|
||||
|
||||
public application: ClientApplication | null;
|
||||
public channels: ChannelManager;
|
||||
public readonly emojis: BaseGuildEmojiManager;
|
||||
public guilds: GuildManager;
|
||||
@@ -217,13 +223,12 @@ declare module 'discord.js' {
|
||||
public voice: ClientVoiceManager;
|
||||
public ws: WebSocketManager;
|
||||
public destroy(): void;
|
||||
public fetchApplication(): Promise<ClientApplication>;
|
||||
public fetchGuildPreview(guild: GuildResolvable): Promise<GuildPreview>;
|
||||
public fetchInvite(invite: InviteResolvable): Promise<Invite>;
|
||||
public fetchGuildTemplate(template: GuildTemplateResolvable): Promise<GuildTemplate>;
|
||||
public fetchVoiceRegions(): Promise<Collection<string, VoiceRegion>>;
|
||||
public fetchWebhook(id: Snowflake, token?: string): Promise<Webhook>;
|
||||
public generateInvite(options?: InviteGenerationOptions): Promise<string>;
|
||||
public generateInvite(options?: InviteGenerationOptions): string;
|
||||
public login(token?: string): Promise<string>;
|
||||
public sweepMessages(lifetime?: number): number;
|
||||
public toJSON(): object;
|
||||
@@ -257,8 +262,11 @@ declare module 'discord.js' {
|
||||
public botPublic: boolean | null;
|
||||
public botRequireCodeGrant: boolean | null;
|
||||
public cover: string | null;
|
||||
public flags: Readonly<ApplicationFlags>;
|
||||
public owner: User | Team | null;
|
||||
public readonly partial: boolean;
|
||||
public rpcOrigins: string[];
|
||||
public fetch(): Promise<ClientApplication>;
|
||||
}
|
||||
|
||||
export class ClientUser extends User {
|
||||
@@ -2299,6 +2307,17 @@ declare module 'discord.js' {
|
||||
type: 'BIG' | 'SMALL';
|
||||
}
|
||||
|
||||
type ApplicationFlagsString =
|
||||
| 'MANAGED_EMOJI'
|
||||
| 'GROUP_DM_CREATE'
|
||||
| 'RPC_HAS_CONNECTED'
|
||||
| 'GATEWAY_PRESENCE'
|
||||
| 'FATEWAY_PRESENCE_LIMITED'
|
||||
| 'GATEWAY_GUILD_MEMBERS'
|
||||
| 'GATEWAY_GUILD_MEMBERS_LIMITED'
|
||||
| 'VERIFICATION_PENDING_GUILD_LIMIT'
|
||||
| 'EMBEDDED';
|
||||
|
||||
interface AuditLogChange {
|
||||
key: string;
|
||||
old?: any;
|
||||
|
||||
Reference in New Issue
Block a user