Hey, everyone. I have this function in which I check if a user
isn’t already in the database, and if they aren’t, it’ll create a new user and return void. But, when I tried to push something into the user’s infractions
, nothing is being shown? Why is this?
Code which pushes obj:
user.updateOne(
{ userID: GuildMember.user.id },
{
$push: {
[`interactions.ban`]: { $each: DataLog },
},
},
);
This is what it looks like:
and It’s supposed to look like:
I only get the second screenshot after I ban them once more.