HakkinDavid / OugiBot

Oshino Ougi
https://top.gg/bot/629837958123356172
3 stars 0 forks source link

[FR] Remove learned phrases #3

Closed Sonico98 closed 4 years ago

Sonico98 commented 4 years ago

Thanks for providing such a wonderful bot. Currently, there seems to be no way of making Ougi forget something she learned with the learn command. It'd be great to have something like "Ougi forget", as trying to replace an already existing trigger doesn't work (ougi will keep replying with the old phrase).

Also, I'm not sure if there's a proper way to pass urls to the learn command, as the double slash after https: conflicts with Ougi's learning mechanism. The solution right now is to remove the https:// part from urls, but that way Discord doesn't generate link previews.

HakkinDavid commented 4 years ago

Oh, right. Thank you for taking the time to point this out.

Ougi's AI modules save new replies to existing triggers, without overriding them (making it possible to have more than one possible reply) and randomly selects one under prompt. The reason behind Ougi not having a forget command yet is I was debating whether to allow anyone to execute it or not. Though, I've just concluded that since Ougi is the result of collective mind, as everyone can teach things to it, everyone should be able to make it forget those too. I'll start programming this command right after dinner, probably will be ready and on production instance by midnight (PST).

As for learn command's syntax, I also noticed this problem with double slashes and URLs. Take a look at embed command, it uses the same arguments index method (in-code, I called it "breakChocolate", don't mind me, just a Chocolate Insomnia reference), but since embed's inevitably need URLs, I changed the arguments breaker from double slashes (//) to double colons (::). I'll update this on learn command too, now that I'm at it.

Again, thank you for reaching me out with this awesome feedback.

HakkinDavid commented 4 years ago

Took a bit longer to commit changes because I also programmed a new "newspaper" command. Anyways, here it is.

image image

Closing the issue now 😎

Sonico98 commented 4 years ago

Sorry to reply to an already closed issue, but woah. Thanks for the insanely quick response and implementation (+ fixes)!

PD: nice Chocolate Insomnia reference.