Approved plugins for the LCTV Bot
Display follower notifications on your stream via the LCTV Bot web page.
- Author: Owen Conti
- Version: 1.0.0.
- URL: https://github.com/owenconti/lctv-bot-follower-notification-plugin
- NPM: https://www.npmjs.com/package/lctv-bot-follower-notification-plugin
- Author: Owen Conti
- Version: 1.0.0
- URL: https://github.com/owenconti/lctv-bot-insult-plugin
- NPM: No URL yet
Voting system for the LCTV Bot.
- Author: Owen Conti
- Version: 1.0.0
- URL: https://github.com/owenconti/lctv-bot-vote-plugin
- NPM: https://www.npmjs.com/package/lctv-bot-vote-plugin
API trigger hooks available via chat messages.
- Author: Owen Conti
- Version: 1.0.0
- URL: https://github.com/owenconti/lctv-bot-vote-api-triggers
- NPM: https://www.npmjs.com/package/lctv-bot-api-triggers-plugin
Flyouts available for the client app.
- Author: Owen Conti
- Version: 1.0.0
- URL: https://github.com/owenconti/lctv-bot-flyouts-plugin
- NPM: Link to npm registry
YouTube song requests/playlist management to be used with the client app.
- Author: Owen Conti
- Version: 1.0.0
- URL: https://github.com/owenconti/lctv-bot-youtube-plugin
- NPM: https://www.npmjs.com/package/lctv-bot-youtube-plugin
-
Each plugin resides in its own directory. To begin writing your own plugin, navigate to the
pluginsdirectory, and create a new directory for your plugin. The directory name should be the same name as your repository on github, ie: 'lctv-bot-follow-notification-plugin'. -
Plugins for the LCTV Bot are their own NPM packages. Create a NPM package with
npm initinside your plugin's directory. Answer the questions prompted on screen. Since plugins are NPM packages, you are able to install whatever other NPM packages you need. Make sure you use the--saveargument when callingnpm installso that other users of your plugin, also get the NPM package dependencies. -
All plugins require an
index.jsfile. Theindex.jsfile is used by the bot to process incoming commands, and to send commands over the WebSocket connection. Create anindex.jsfile inside your plugin's directory. -
The
index.jsfile must export an array of command objects. Each command is checked against each incoming message, and when a match is found, the action function for the command is ran. An example of anindex.jsfile is:
module.exports = [{
types: ['message'],
regex: /hello/,
action: function( chat, stanza ) {
chat.replyTo( stanza.user.username, 'Hello, welcome to the stream!' );
}
}
The above plugin, would reply 'Hello, welcome to the stream!' to whoever types 'hello' in chat.
-
Plugins have access to all of the regular settings stored in the
setupdirectory. In addition, plugins can also have their own settings, which are stored in asettings.jsonin the plugin's directory. Note: If your plugin depends on asettings.jsonfile, ensure thesettings.jsonfile is ignored by git. -
Write a
README.md! Without a README, users trying to install and use your plugin will be lost. Take the time to write out and explain how to use your code! -
See the core commands, and other plugins as examples.
(https://github.com/owenconti/livecodingtv-bot/tree/master/commands)[https://github.com/owenconti/livecodingtv-bot/tree/master/commands] (https://github.com/owenconti/livecodingtv-bot-plugins)[https://github.com/owenconti/livecodingtv-bot-plugins]