Adding null safety

This commit is contained in:
2023-08-14 22:16:30 +02:00
parent 90f8d23d61
commit 1905dafde5

View File

@@ -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 = {
]
});
}
};
};