Adding null safety
This commit is contained in:
@@ -85,9 +85,7 @@ module.exports = {
|
|||||||
var username = user1.username + "#" + user1.discriminator
|
var username = user1.username + "#" + user1.discriminator
|
||||||
}
|
}
|
||||||
|
|
||||||
const linkedDiscord = stats.data.player.socialMedia.links.DISCORD
|
if (!stats.data.player.socialMedia.links.DISCORD) {
|
||||||
|
|
||||||
if (!linkedDiscord) {
|
|
||||||
interaction.editReply({
|
interaction.editReply({
|
||||||
embeds: [
|
embeds: [
|
||||||
{
|
{
|
||||||
@@ -99,7 +97,7 @@ module.exports = {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (linkedDiscord !== username) {
|
if (stats.data.player.socialMedia.links.DISCORD !== username) {
|
||||||
interaction.editReply({
|
interaction.editReply({
|
||||||
embeds: [
|
embeds: [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user