Open elkowar opened 4 years ago
Instead of !note undo
we could also just make them indices, show the numbers and then do !note remove <note-nr>
(that number just being an index). would not be quite as easy to implement (idk is there a way to do "delete the nth element in chronological order" in sql?), but would be a much better UX and lessen the theoretical possibility of a wrong deletion
Yes, that would be better. You could sort oldest to newest, skip \<note-nr>, limit 1 and delete that
sounds good!
Should people see undone notes for a user? Maybe use strikethrough when creating a replied messages based on an "isActive" field? Instead of just completely wiping from the database.
I don’t think that’s necessarily a good idea, as I would say the main intent behind an undo is being able to undo things like spelling errors, bad note descriptions, accidentally tagging the wrong user, etc. A note or warn that has been given for a good reason should never be removed at all. If the person apologises or whatever, we can add another note saying that, but I’d not want to remove it there,
Of course this is just my understanding of the purpose here, if others Have different ideas I’m open of course
The warn and note commands should have a
!note undo <user>
/!warn undo <user>
command to remove the latest warn / note.