Add notifications plugin (notify of song on play event)

This commit is contained in:
TC
2020-11-11 11:35:58 +01:00
parent 1dcf76b006
commit bcff6e5134
4 changed files with 139 additions and 2 deletions

View File

@ -0,0 +1,18 @@
const { triggerAction } = require("../utils");
const CHANNEL = "notification";
const ACTIONS = {
NOTIFICATION: "notification",
};
function notify(info) {
triggerAction(CHANNEL, ACTIONS.NOTIFICATION, info);
}
module.exports = {
CHANNEL,
ACTIONS,
global: {
notify,
},
};