Controlp5 - Multiple buttons that use one function

I got found a solution, I had the buttons all be called "doThis" + UID and then added some code that tested if ‘doThis’ was in the name on the listener and ran the code like that.