From e8741434f150d6965dec662fa3e76f71c8d08b9e Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 20 Apr 2020 13:16:57 -0400 Subject: [PATCH] Fix --- commands/games-mp/guesspionage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/games-mp/guesspionage.js b/commands/games-mp/guesspionage.js index b9ac4a57..198e3122 100644 --- a/commands/games-mp/guesspionage.js +++ b/commands/games-mp/guesspionage.js @@ -54,7 +54,7 @@ module.exports = class GuesspionageCommand extends Command { pts.set(player, { points: 0, id: player, - user: this.client.users.get(player) + user: this.client.users.cache.get(player) }); } const used = []; @@ -132,7 +132,7 @@ module.exports = class GuesspionageCommand extends Command { `); } this.client.games.delete(msg.channel.id); - const winner = this.client.users.get(pts.sort((a, b) => b.points - a.points)); + const winner = pts.sort((a, b) => b.points - a.points)[0].user; return msg.say(`Congrats, ${winner.user}!`); } catch (err) { this.client.games.delete(msg.channel.id);