So, I made a peanut butter sandwich the other day but forgot about it and left it (wrapped in gladwrap) out in room temperature for 6 hours. (Brioche bun as the bread, peanut butter and butter) and I was wondering if it would be ok to eat as I ate it anyways.
Generally, peanut butter has a fairly good shelf life. Putting it on bread doesn't change that.
Ordinary salted butter should also be alright for a day or two, as long as it wasn't in direct sunlight or high moisture or anything like that.
Most importantly, both butter and peanut butter will not spoil in a way that goes unnoticed. They will smell or feel wrong very obviously.
Disclaimer: This is not restaurant level hygiene advice, and probably contradicts public-health guidelines. It's certainly good enough for your own sandwiches though.