Files
PointsBot/docs/TODO.md
2021-02-22 00:26:34 -08:00

3.9 KiB

TODO

File-specific lists are in loose descending order of priority.

Current

  • Change commands from !solved and /solved to !helped and /helped
  • Allow multiple users to be awarded points on a single post
    • So just check whether each user is already awarded a point for a given post

Bugs

  • Users can get multiple points for same solution
    • Scenario:
      • OP comments !solved
      • OP deletes !solved comment
      • OP comments !solved again
    • Hopefully this will be easily solved once db migrations are working

General

File-Specific

bot.py

  • (Maybe) sanitize input text?
  • Now that the date of each solution is being stored, can check for missed submissions each time the bot is run by searching subreddit history until last solution found
  • Allow mods and/or bot owner to add or remove points from specific users
  • Make the algorithm for determining the problem solver more sophisticated
    • e.g. check entire comment tree instead of just ignoring if the OP also authored the parent comment
    • Ask OP for clarification only if solver cannot be sufficiently determined
    • Again, this behavior could also perhaps be better enforced through subreddit rules rather than algorithmically

config.py

  • Add list of emails to which notifications should be sent
  • Switch from toml package to tomlkit package
    • Preserves style, comments, etc.

database.py

  • For each solved submission, store:
    • submission id
    • solution comment id
    • solved comment id
    • date
    • solver id
  • Possibly refactor for a datastore type thing instead of database
    • Maybe even make models like Redditor to combine data storage/access with logic, e.g. determining current level
    • Seems like overkill, though