oftn-bot
oftn-bot copied to clipboard
!learn should tell what the old factoid was, or that there was none.
I just forgot to check the factoid name, so to avoid data loss by fallible humans, let's make !learn state whether there was a factoid by that name, and what it was. Maybe even a special value <<restore>> to restore the previous value for the factoid, at least for a few minutes after the !learn. (An extra restore would decouple this problem from problems of maximum message length.)
Maybe !undo and !restore implementations would be a good solution too
Yeah, but a new command would reduce the factoid namespace even more.
How about adding a learn command? !learn undo myfactoid and !learn redo myfactoid.. Syntax would roughly be learn ( [alias|undo|redo] foo = bar | foo =~ s/expression/replace/gi )
Sounds good! :+1: