I have a question for those of you that are pretty comfortable with the api in general, which is simply the title. I had thought that api-type messages from the 'chat:message' events were delimited to individual calls for each '![function-call]' received from the chat, until I had to process a macro that sent two api commands: !token-mod --set statusmarkers|=dead !xp @{selected|xp} Which in turn threw my basic chat handling listener a functional error: //expects a single api call handleCall = function(msg){ log(msg.content); //returns the above commands delimited by a carriage return if(msg.type == "api" && msg.content.indexOf("!xp " !== -1)){ let xpAdd = parseInt(msg.content.split(' ')[1]); if(xpAdd != "NaN"){ xp(xpAdd); } } } I'm working on refactoring the handler instead of trying to fix or add a couple lines, so In general, what best practices do you all use to safely handle and parse chat commands?