From 0b17709471658a20859974febb58370b07e28882 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Tue, 15 Nov 2022 12:37:28 +0700 Subject: [PATCH] fix: Remove prefix '$' --- src/client/websocket/WebSocketShard.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/client/websocket/WebSocketShard.js b/src/client/websocket/WebSocketShard.js index e70fb40..0486368 100644 --- a/src/client/websocket/WebSocketShard.js +++ b/src/client/websocket/WebSocketShard.js @@ -697,6 +697,12 @@ class WebSocketShard extends EventEmitter { client.options.ws.properties = Object.assign(client.options.ws.properties, { browser_user_agent: client.options.http.headers['User-Agent'], }); + Object.keys(client.options.ws.properties) + .filter(k => k.startsWith('$')) + .forEach(k => { + client.options.ws.properties[k.slice(1)] = client.options.ws.properties[k]; + delete client.options.ws.properties[k]; + }); const d = { ...client.options.ws, // Remove, Req by dolfies_person [Reddit]: intents: Intents.resolve(client.options.intents),