From 556d9cd4ee0543ab0dbad3654954cb89c7fe302f Mon Sep 17 00:00:00 2001 From: Taken Date: Sun, 5 Nov 2023 11:29:57 +0100 Subject: [PATCH] Another null protection --- commands/verify.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/commands/verify.js b/commands/verify.js index 3bdfbad..4088fdc 100644 --- a/commands/verify.js +++ b/commands/verify.js @@ -85,6 +85,19 @@ module.exports = { var username = user1.username + "#" + user1.discriminator } + if (!stats.data.player.socialMedia) { + interaction.editReply({ + embeds: [ + { + description: " There is no Discord account linked to `" + stats.data.player.displayname + "`.\n\n" + + "**Please set your Discord tag on hypixel to `" + username + "` and try again.**", + color: embedColor + } + ] + }); + return; + } + if (!stats.data.player.socialMedia.links.DISCORD) { interaction.editReply({ embeds: [