-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
!learn plugin #36
Comments
This seems like something that might be up @s0ph0s-2's alley. Similar in scope to the live quotes editing, at least nominally. |
@rikai Yup, that's something I could totally do. I think I'll take a look at it tomorrow... |
Actually, you can already do this with the quotes plugin. It registers a handler for I see two options here:
|
I thing i prefer option 2. The proper solution here feels like it would be to split it into it's own thing. I feel like !quote add and !quote delete should be for adding lines to existing quote commands, not create new ones. As for !learn, i might suggest it be called !command instead. So !command add . Perhaps we should have an optional "type" argument as well? so we could define the type "quote", which would give the shifted !quote add and !quote remove access to it? So the TL;DR would be
Does this sound smart/doable? I'm open to criticism over my suggestions. 📦 |
So, would the commands and the quotes be managed from the same plugin file and stored in the same YAML document? It seems to me like the more sustainable option would be to split them out entirely and manage them with completely separate plugins. |
Well, my thought was that we might have more command types down the road, so it would make sense to have everything under one roof, so to speak, with the different types doing different sorts of things when defined. Think of it as a sort of meta-plugin, where depending on the command type, it uses a different sub-plugin/codepath. So the existing quotes functionality would become one of those codepaths, the arbitary generic command adding would be another, a future type would be a third, etc |
Ah, okay. I see. I'll get to work on that then! |
I think it might work better if we use Anyone else want to weigh in? I'm certainly open to suggestions. |
Well, the way i was picturing it was that !command would be the sole place that you would add/remove commands. The other triggers would be based on whatever you added. thinking further about it I do agree that the existing !quote functionality would be redundant overall. Would make much more sense to do !command <optional type (e.g. 'quote')> <add/remove> . I've also been considering changing how the quote system works completely, rather than having per-person custom triggers, i've been thinking about just having a simple quote database that pulls random quote using the !quote command, so it might just make sense to keep quotes separate and dump the command types idea entirely and keep the syntax to a super simple !command add instead... Thoughts? |
Just pulling a random quote from among all of the available ones seems like it would be OK to me. However, that breaks some existing functionality ( |
I'm still honestly not sure how I wan't to go about this. I've been looking at various other bots across other services and languages for comparison since my last reply and think that integrating quotes into the generic hierarchy might not be the best option after all. It's not commonly handled that way in most other bots and also complicates the potential future syntax. Been evaluating how others do custom commands and quotes among other things, and the one i like the most so far is probably this one. It breaks down 'arbitrary' commands into four distinct types, Custom Triggers, Custom Repeats, Custom Scheduled, and Auto-Replies. The quotes command is entirely separate from the custom triggers, as are other 'fun' commands, equivalent to If you happen to know java, you can probably browse the source to get an idea of how it's done, but i feel like we should probably take a similar approach. If you're amenable to adopting that kind of approach, i can expand further. |
I do happen to know Java, so I'll definitely take a look at how CoeBot does things. I agree, their approach looks like it works well and would also work for Showbot. I also agree that it seems appropriate to implement one-off, joke features as separate plugins, rather than attempting to shove them all into an over-genericized box. Cinchize makes it rather easy to add new plugins, so it isn't exceedingly difficult to add these features that way. This also seems like a good incentive to figure out how to fix #32, since new plugins can then be dropped in without having to restart Showbot. If we do choose to implement the 'arbitrary' commands the same way CoeBot does, what happens to the current quotes behavior? |
We could write a plugin such that certain privileged users can tell JBot to `!learn command reply with this text" so that we can quickly add static replies for commands that people might be interested in:
They can be saved in-memory, and so be temporary, or be saved permanently so they might be available longer. Associated would be a
!unlearn command
command to forget commands once they are no longer needed.Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: