mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-20 05:23:31 +01:00
feat: Support new application properties and patch endpoint (#9709)
* feat: support new application endpoints * chore: edit comment * fix(ClientApplication): handle flags properly * types: `readonly` * chore: update route * feat: add to core * refactor(ClientApplication): add to user manager * chore: remove comments --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
17
packages/discord.js/typings/index.d.ts
vendored
17
packages/discord.js/typings/index.d.ts
vendored
@@ -496,6 +496,8 @@ export class ApplicationFlagsBitField extends BitField<ApplicationFlagsString> {
|
||||
public static resolve(bit?: BitFieldResolvable<ApplicationFlagsString, number>): number;
|
||||
}
|
||||
|
||||
export type ApplicationFlagsResolvable = BitFieldResolvable<ApplicationFlagsString, number>;
|
||||
|
||||
export type AutoModerationRuleResolvable = AutoModerationRule | Snowflake;
|
||||
|
||||
export abstract class Base {
|
||||
@@ -1019,6 +1021,7 @@ export class ClientApplication extends Application {
|
||||
private constructor(client: Client<true>, data: RawClientApplicationData);
|
||||
public botPublic: boolean | null;
|
||||
public botRequireCodeGrant: boolean | null;
|
||||
public bot: User | null;
|
||||
public commands: ApplicationCommandManager;
|
||||
public guildId: Snowflake | null;
|
||||
public get guild(): Guild | null;
|
||||
@@ -1030,8 +1033,10 @@ export class ClientApplication extends Application {
|
||||
public customInstallURL: string | null;
|
||||
public owner: User | Team | null;
|
||||
public get partial(): boolean;
|
||||
public interactionsEndpointURL: string | null;
|
||||
public roleConnectionsVerificationURL: string | null;
|
||||
public rpcOrigins: string[];
|
||||
public edit(optins: ClientApplicationEditOptions): Promise<ClientApplication>;
|
||||
public fetch(): Promise<ClientApplication>;
|
||||
public fetchRoleConnectionMetadataRecords(): Promise<ApplicationRoleConnectionMetadata[]>;
|
||||
public editRoleConnectionMetadataRecords(
|
||||
@@ -6518,6 +6523,18 @@ export interface WelcomeScreenEditOptions {
|
||||
welcomeChannels?: WelcomeChannelData[];
|
||||
}
|
||||
|
||||
export interface ClientApplicationEditOptions {
|
||||
customInstallURL?: string;
|
||||
description?: string;
|
||||
roleConnectionsVerificationURL?: string;
|
||||
installParams?: ClientApplicationInstallParams;
|
||||
flags?: ApplicationFlagsResolvable;
|
||||
icon?: BufferResolvable | Base64Resolvable | null;
|
||||
coverImage?: BufferResolvable | Base64Resolvable | null;
|
||||
interactionsEndpointURL?: string;
|
||||
tags?: readonly string[];
|
||||
}
|
||||
|
||||
export interface ClientApplicationInstallParams {
|
||||
scopes: OAuth2Scopes[];
|
||||
permissions: Readonly<PermissionsBitField>;
|
||||
|
||||
Reference in New Issue
Block a user