Perth-Artifactory / pledgeBot

Project pledge/crowdfunding system operated through Slack
https://perart.io/pledgeBot
2 stars 0 forks source link

Function cleanup #3

Open FletcherAU opened 3 years ago

FletcherAU commented 3 years ago

Functions should be split up into several categories:

  1. Utility functions - These functions return data or perform an action not related to slack.
  2. Block constructors - These functions return a list of blocks. Output from these functions can be assigned to blocks directly or concatenated with other block constructors.
  3. Slack entry points - Slack only lets bots open modals etc in response to particular entry points to prevent bots harassing users.
  4. Slack actions - These functions respond to events from Slack using data from Utility and Block constructors.
  5. Slack data - These functions respond to app.options calls. Speed optimisation here will directly affect load times of input boxes.

TODO: function names/folders