After three days of trying to solve this, I am giving up on trying to use the mongoose schema to do this. I am now getting an error saying "Cannot create field ‘guildId’ in element. So for anyone else reading this, give up now and save yourself three days.
I created a new function that connects to the database using the MongoDB library, and update the database that way.