This is my code:
function remove(guild, u) {
return db.updateOne({ guild }, {
$pull: { "feeds": { "user": { "screen_name": u } } }
})
}
When I run remove("718471604291764295", "twitter") it doesn't remove. My schema is:
{
guild: String,
feeds: [{
channel: String,
webhook: {
id: String,
token: String,
},
user: {
id: String,
screen_name: String,
}
}]
}
What's wrong with this?