Open ethanwillis opened 7 years ago
Discord will load plugins from an array at runtime and then install them at runtime using NPM and pass back references to the installed NPM modules to the core.
https://github.com/chalda/DiscordBot/blob/master/plugins.js
The DiscordBot plugin interface just uses a "commands" array that's exported with functions. Example here from @Longlius 4chan plugin for DiscordBot
https://github.com/chalda/DiscordBot/blob/master/plugins/4chan/4chan.js
Phonetop should support pluggable backends for monitoring different types of systems.
Examples of potential candidates for pluggable backends: https://github.com/kadira-open/kadira-server Could be used as a pluggable backend for monitoring statuses of meteor applications running on a server.
https://www.npmjs.com/package/docker-status This could be used to monitor processes running within docker containers on a host.
We will need to define an interface for pluggable backends that wrap around these types of applications.
Off the top of my head this interface should support meta operations for listing what commands are available through them.