From 9da18d0833fb17bee2e40330475bea33d5939faf Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Sun, 12 Nov 2023 20:58:19 +0000 Subject: [PATCH] fix(BaseClient): default in objects properly --- packages/discord.js/src/client/BaseClient.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/discord.js/src/client/BaseClient.js b/packages/discord.js/src/client/BaseClient.js index 97ec633de38d..8b1c261fab7e 100644 --- a/packages/discord.js/src/client/BaseClient.js +++ b/packages/discord.js/src/client/BaseClient.js @@ -27,11 +27,20 @@ class BaseClient extends EventEmitter { this.options = { ...defaultOptions, ...options, + presence: { + ...defaultOptions.presence, + ...options.presence, + }, + sweepers: { + ...defaultOptions.sweepers, + ...options.sweepers, + }, ws: { ...defaultOptions.ws, ...options.ws, }, rest: { + ...defaultOptions.rest, ...options.rest, userAgentAppendix: options.rest?.userAgentAppendix ? `${Options.userAgentAppendix} ${options.rest.userAgentAppendix}`