hmn/src/discord/todo.txt

49 lines
2.2 KiB
Plaintext

the goal: port the old discord showcase bot
what it does: save #project-showcase posts to your HMN user profile if you have your account linked
stuff we need to worry about:
- old posts from before you linked your account
- posts that come in while the bot is down
- what to do with posts if you unlink your account
- what to do with posts if you re-link your account
✔ - what to do if you edit the original discord message
- what to do if you delete the original discord message
✔ - the user's preferences re: saving content
- we don't want to save content without the user's consent, especially since it may persist after they disable the integration
- manually adding content for various reasons
- maybe a bug prevented something from saving
- ryan used to post everything in #projects for some reason
✔ real-time stuff:
✔ - on new showcase message
- always save the lightweight record
- if we have permission, create a snippet
✔ - on edit
- re-save the lightweight record and content as if it was new
- create snippet, unconditionally???? (bug??)
- update snippet contents if the edit makes sense
✔ - on delete
- delete snippet if the user so desires
- delete the message records
✔ - on bulk delete
- same stuff
background stuff:
- watch mode
- every five seconds
- fetch all HMN users with Discord accounts
- check if we have message records without content
- if so, run a full scrape (no snippets)
- every hour
- run a full scrape, creating snippets
- scrape behavior
- look at every message ever in the channel
- do exactly what the real-time bot does on new messages (although maybe don't do snippets depending on context)
what the heck do we do with discord's markdown
- when we save message contents, we should save both the raw discord markdown and a version with their custom stuff replaced. We do _not_ (yet) need a full markdown parse with HTML tags and stuff. (That arguably doesn't make sense for the handmade_discordmessagecontent record anyway.)
- when we create a snippet, we should store both markdown that makes sense to a user and the rendered version of that HTML. THIS MEANS: The markdown we save is the "clean" version of the Discord markdown.