diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 43eddb7c7..98efc4d5c 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -186,6 +186,8 @@ class ClientUser extends User { if (game.url) game.type = 1; } + if (data.game === null) game = null; + if (typeof data.afk !== 'undefined') afk = data.afk; afk = Boolean(afk); @@ -224,11 +226,12 @@ class ClientUser extends User { /** * Sets the game the client user is playing. - * @param {string} game Game being played + * @param {?string} game Game being played * @param {string} [streamingURL] Twitch stream URL * @returns {Promise} */ setGame(game, streamingURL) { + if (game === null) return this.setPresence({ game }); return this.setPresence({ game: { name: game, url: streamingURL,