From dc67800a493e96cd62ccfa7d64a4875dd95c72c8 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Tue, 22 Aug 2023 23:32:13 +0100 Subject: [PATCH] refactor(ClientApplication): add to user manager --- packages/discord.js/src/structures/ClientApplication.js | 4 ++-- packages/discord.js/typings/index.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/discord.js/src/structures/ClientApplication.js b/packages/discord.js/src/structures/ClientApplication.js index bb8035f8869c..065b1fa1bbf9 100644 --- a/packages/discord.js/src/structures/ClientApplication.js +++ b/packages/discord.js/src/structures/ClientApplication.js @@ -122,10 +122,10 @@ class ClientApplication extends Application { if ('bot' in data) { /** - * A partial user for the bot associated with this application. + * The bot associated with this application. * @type {?User} */ - this.bot = data.bot; + this.bot = this.client.users._add(data.bot); } else { this.bot ??= null; } diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 27a6b5434405..b651c51931e5 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -1020,7 +1020,7 @@ export class ClientApplication extends Application { private constructor(client: Client, data: RawClientApplicationData); public botPublic: boolean | null; public botRequireCodeGrant: boolean | null; - public bot: PartialUser | null; + public bot: User | null; public commands: ApplicationCommandManager; public guildId: Snowflake | null; public get guild(): Guild | null;