mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 14:02:02 +00:00
fix(ClientManager): patch ClientUser's presence with ClientOption's one (#2458)
This commit is contained in:
parent
f2474845ba
commit
61ad9475de
1 changed files with 3 additions and 1 deletions
|
|
@ -41,7 +41,9 @@ class ClientManager {
|
|||
const timeout = this.client.setTimeout(() => reject(new Error('WS_CONNECTION_TIMEOUT')), 1000 * 300);
|
||||
this.client.api.gateway.get().then(async res => {
|
||||
if (this.client.options.presence != null) { // eslint-disable-line eqeqeq
|
||||
this.client.options.ws.presence = await this.client.presences._parse(this.client.options.presence);
|
||||
const presence = await this.client.presences._parse(this.client.options.presence);
|
||||
this.client.options.ws.presence = presence;
|
||||
this.client.presences.clientPresence.patch(presence);
|
||||
}
|
||||
const gateway = `${res.url}/`;
|
||||
this.client.emit(Events.DEBUG, `Using gateway ${gateway}`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue