https://github.com/PitchforkAssistant/devvit-flair-assistant/blob/main/src%2Fhandlers%2Fevents.ts
Ideally it wouldn't be just one large file of if statements. Most likely create a file to handle each possible thing it can do, then call them based on which ones are present in a given config. The full config would still need to be passed to each handler, just to handle mutually exclusive cases (e.g. set flair and clear flair).
https://github.com/PitchforkAssistant/devvit-flair-assistant/blob/main/src%2Fhandlers%2Fevents.ts
Ideally it wouldn't be just one large file of if statements. Most likely create a file to handle each possible thing it can do, then call them based on which ones are present in a given config. The full config would still need to be passed to each handler, just to handle mutually exclusive cases (e.g. set flair and clear flair).