function onStart(ctx) { ctx["hello"] = "Hello, world!" //ctx is an empty object used for passing data between onStart and onStop ctx["command"] = demon.commands.add({name: "plugin", callback: (args)=>"Hello, world!"}) } function onStop(ctx) { console.log(ctx["hello"].replace("Hello", "Goodbye")) ctx["command"]() } export default { onStart, onStop }