How do I clean messages out of a rocketchat room or channel?

We switched from a paid slack account last year, to rocketchat. I've written bots in the past to alert coworkers of system issues in a more public place, but some of my rooms were getting upwards of 10,000 messages and the browser and phones would be extremely slow pulling…