From 1905dafde5a02bd1c015453433c4f933a6aa2162 Mon Sep 17 00:00:00 2001 From: Taken Date: Mon, 14 Aug 2023 22:16:30 +0200 Subject: [PATCH] Adding null safety --- commands/verify.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/commands/verify.js b/commands/verify.js index f776511..c486f26 100644 --- a/commands/verify.js +++ b/commands/verify.js @@ -85,9 +85,7 @@ module.exports = { var username = user1.username + "#" + user1.discriminator } - const linkedDiscord = stats.data.player.socialMedia.links.DISCORD - - if (!linkedDiscord) { + if (!stats.data.player.socialMedia.links.DISCORD) { interaction.editReply({ embeds: [ { @@ -99,7 +97,7 @@ module.exports = { }); return; } - if (linkedDiscord !== username) { + if (stats.data.player.socialMedia.links.DISCORD !== username) { interaction.editReply({ embeds: [ { @@ -191,4 +189,4 @@ module.exports = { ] }); } -}; \ No newline at end of file +};