mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
fix: nullable activity
This commit is contained in:
@@ -54,12 +54,16 @@ class ClientPresenceStore extends PresenceStore {
|
||||
application_id: applicationID || undefined,
|
||||
secrets: activity.secrets || undefined,
|
||||
instance: activity.instance || undefined,
|
||||
} : this.clientPresence.activity,
|
||||
} : null,
|
||||
};
|
||||
|
||||
if ((status || afk || since) && !activity) {
|
||||
packet.game = this.clientPresence.activity;
|
||||
}
|
||||
|
||||
if (packet.game) {
|
||||
packet.game.type = typeof packet.game.type === 'number' ?
|
||||
packet.game.type : ActivityTypes.indexOf(packet.game.type)
|
||||
packet.game.type : ActivityTypes.indexOf(packet.game.type);
|
||||
}
|
||||
|
||||
this.clientPresence.patch(packet);
|
||||
|
||||
Reference in New Issue
Block a user