oftn-bot icon indicating copy to clipboard operation
oftn-bot copied to clipboard

!learn should tell what the old factoid was, or that there was none.

Open mk-pmb opened this issue 8 years ago • 4 comments

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.)

mk-pmb avatar Sep 09 '17 19:09 mk-pmb

Maybe !undo and !restore implementations would be a good solution too

dsamarin avatar Sep 09 '17 19:09 dsamarin

Yeah, but a new command would reduce the factoid namespace even more.

mk-pmb avatar Sep 09 '17 19:09 mk-pmb

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 )

dsamarin avatar Sep 09 '17 20:09 dsamarin

Sounds good! :+1:

mk-pmb avatar Sep 09 '17 23:09 mk-pmb