StampyAI / stampy

A Discord bot for the Robert Miles AI server
37 stars 9 forks source link

only load modules in STAMPY_MODULES #247

Closed ProducerMatt closed 1 year ago

ProducerMatt commented 1 year ago

This PR adds a module whitelist in the environment variable $STAMPY_MODULES.

I decided to make a whitelist rather than a blacklist, since it means less surprises down the road for server admins updating their local Stampys. To get the original default-all behavior, set the variable to "ALL"

I've really only been testing with the paper search module, but I plan to go down the list of other modules and see what can be re-enabled. As I do so I may have more small changes to make in other modules.

ProducerMatt commented 1 year ago

Hang on, I think I screwed up the unset variable behavior. One moment please

ProducerMatt commented 1 year ago

Ok, it's working as intended now, my apologies.

tayler6000 commented 1 year ago

MUST UPDATE .ENV ON SERVER BEFORE MERGE.