Skip to content
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

Supybot style commands #57

Open
ylt opened this issue Aug 2, 2015 · 0 comments
Open

Supybot style commands #57

ylt opened this issue Aug 2, 2015 · 0 comments

Comments

@ylt
Copy link
Member

ylt commented Aug 2, 2015

Supybot is a python based irc bot.

With supybot, the plugins themselves are part of the command. If the command is unique, then it can be accessed directly, whereas if multiple plugins define the same command then it must be done through plugin name (i.e. !playlist grab). It is also possible to which is the default in the configuration.

A potential case where this is useful is !gif (as we may add additional sites). This will allow doing !imgur gif [query], !giphy gif [query], !reddit gif [query] (where imgur, giphy and reddit are the actual plugin names). If no default is set, output a message like "gif is available in imgur, giphy and reddit", but if a default is set (i.e. to giphy) then the user can directly use !gif [query]

This also makes commands such as plugman and playlists tidier. Rather than having to implement subcommand handling within the plugin itself, they're being done the layer above. The main reason for implementing subcommands in these was because of the risk of conflict, i.e. multiple plugins could implement !reload (i.e. both plugman and admin). So implementing this will fix that issue and make some commands easier 😄.

Command changes (off of the top of my head)

  • remove !plugin and !plugins (accessed via !plugman or directly instead)
  • remove !callouts
  • remove !playlist

!callouts and !playlist won't actually change in usage, as they're already named the same as plugin, it'll just allow more flexibility in using the subcommands 😄

@ylt ylt self-assigned this Aug 5, 2015
@ylt ylt added the ready label Aug 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant