Update
Nigel had stopped eating his oat treats so we bought him some new food that had goji berries and rose hips mixed in just to try and get him to eat something while mazuri ships. He picks out the treats and avoids the pellets however im just happy hes eating. How should i ween him off of this diet onto mazuri. Hoping that he likes it as he did not like oxbow. And if he doesnt like mazuri what should i do? He is acting otherwise normal as previously stated despite also refusing hay. We are switching hay aswell
Giving only treats is bad enough for their health, if he is not eating you should not be giving ANY treats at all, if you give him treats when he refuses to eat his food you are teaching him that if he doesn't eat his pellets and hay for long enough he gets treats instead. Specifically big issues with the treats you are feeding though is, oats can cause gas, so they are starting to no longer be recommended as treats. If given it's best to limit them to just 2-3 oats a week at most if given at all. One sign, often the first sign, of gas is small poops, to treat that try infant gas drops, about 0.3-0.5 ml (20mg of simethicone per dose) every 8-12 hours, if it doesn't resolve in 24 hours though it's best to get the chin to the vet since it shouldn't take that long to resolve if it is just gas. You can also rub his belly to help get things moving and get him to run around which can help get the gut going too.
The goji berries are not as bad as raisins, but they are still high in sugar, they should be limited to only one per month, otherwise they can cause a lot of health issues. Especially if given multiple berries, the sudden sugar rush followed by the drop can cause seizures and even death.
The rose hips it's best to limit to one per week, or a small pinch of crushed a few times a week, too many can cause diarrhea, which can quickly turn to dehydration and death if not treated right away. So really none of those treats can be used to replace actual food, it's one thing to just give a single small treat at the start of noticing he isn't eating, just to make sure he physically can eat, it's another to just be feeding/letting him eat treats as his whole diet.
In case you are not aware (I know a lot of people believe what the pet store or non chinchilla knowledgeable vet told them or honestly believe since it has a chinchilla on the bag it must be safe for chins), a proper diet for a chinchilla is hay and a good quality pellet only diet, not treats, colorful bits, or other junk food mixed in. The pellets in junk/treat food filled foods are not nutritionally balanced, they count on the other things mixed in to make up for the lack of nutrients in the pellets themselves, so it's not a good idea to just feed the pellets from those foods even if you remove the treats, and in some cases the junk food is also blended into the actual pellets anyway. When giving a bowl of pellets and treats most chins will just pick out the treats and leave the pellets, they aren't smart enough to know that will cause health issues. The other part of a chins diet is hay, it adds much needed fiber to the diet for proper digestion, and is the primary way that chins wear down the molars since hay takes a lot longer to chew then pellets (more time chewing=more tooth wear). Ideally the chin should be eating a couple tablespoons (about 30g) of pellets and about a small handful worth of hay everyday. If your chin is not eating that something is wrong, they are very good at hiding issues and acting normal so you need to take all the little clues, not eating pellets or hay, small poops, and things like that, seriously since it means the issue has gotten bad enough that they can't hide it anymore.
As Jawramik mentioned, if he is not eating you will need to hand feed him, if he wont eat it you may need to burrito wrap him and force feed him. If he doesn't eat proper food, either on his own or force feeding, not just junk food, he will die. It would be best to get him to the vet to find out why he isn't eating though. Tell the vet that he is not eating anything at all, that way they realize it's an emergency and hopefully get you in faster. I could be a sign of a tooth issue, it could also be a sign of gas from getting too much oats or from not enough fiber.