Skip to content

Create a middleware feature that gives direct access to plugins #26

@kyrivanderpoel

Description

@kyrivanderpoel

Plugins currently do not have access to other plugins. It would be useful to write plugins that can run or modify multiple plugins at runtime. Potential use cases would be a logging, wrapping plugins with authentication so Discord users could have access to some plugins restricted or turned off, or listing all features available to the user, as defined by its plugins.

Middleware will be a logical extension of plugins. They may have a chat interface, but they might not. I believe that will one of the defining features: most if not all plugins should define a command, but some middleware may not define a command.

Summing up, middleware:

  • Will be given a similar interface to plugins in that they may have a command interface
  • May act without a discord command interface
  • Will have access to the plugins variable from the discord client, allowing middleware to operate on plugins

The choice between developing a plugin or middleware will be fairly simple: if one needs to develop a command interface or backend operation that needs access to plugins, one will use middleware. Otherwise, one will likely make a plugin.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions