d20pfsrd Discord Bot Scraper Abstraction and Deployment
Here's how I would do it. Move the logic about which pages a parser consumes into the code for said parser. Also organizing your helper files into objects could reduce complexity in terms of the number of variables you pass around but that's more a matter of personal preference.
class SpecificPageParser {
    match(url) {
        return (
           url.startswith('https://www.d20pfsrd.com/magic/') &amp;&amp;
           !url.endsWith('/magic/')
        );
    }
    format(response) {
        // do your parsing stuff
        const formatted = {...response,'extra':'info'};
        return formatted;
    }
}

const responders = [new SpecificPageParser(),new SomeOtherParser()];

async function getPage(msg, url){
    try {
        const responder = responders.find(responder=&gt;responder.match(url));
        if (!responder) return;
        const response = await axios.get(url);
        const message = responder.format(response);
        sendMessage(message, msg);
    }
    catch(error) {
        console.error(error);
    }
  }
```