WritheM / Wallace

https://plug.dj/writhem-radio
Other
4 stars 3 forks source link

Supybot style commands #57

Open ylt opened 9 years ago

ylt commented 9 years ago

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 :smile:.

Command changes (off of the top of my head)

!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 :smile: