Closed ThatsNoMoon closed 4 years ago
Almost LGTM, needs a timeout for listening to edits, otherwise the messages it's listening for will grow endlessly.
I.E. cache invalidation? I thought about it but didn't think it would be a big deal. It looks like the various playground commands have been used about 250 times over the past month, not including ones that got deleted, so I'll guess 350 times. Ideally, that dict would be about 5KiB after 350 usages. At that rate, it would take about 15 years to take up 1MiB. Obviously napkin math but I hope my point stands. I'll add code to remove messages that have been deleted now, since that shouldn't be that hard, but I would rather not try to figure out a good cache invalidation strategy unless it is really deemed necessary. I think it would require a lot more code complexity for not that much benefit, but I'll think about something I could work out.
@ivandardi cough cough
This makes ferris edit responses to ?play, ?playwarn, and ?eval when the input message was edited. This allows for easy fixing of accidental errors and changing play to playwarn.