Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.64 KB

Events.md

File metadata and controls

46 lines (33 loc) · 1.64 KB

ram-api.js


Discord server npm version npm downloads Tests status

Back to readme

Events Example

import * as ramapi from "ram-api.js"; // typescript
const ramapi = require("ram-api.js"); // javascript

const apiEvent = ramapi.Events;
// listion
apiEvent.on("package-update", (data) => {
  console.log(data);
});

//emit to change settings or stop event loops

apiEvent.emit("stop-update-check"); // will stop the update checker that binds to package-update

apiEvent.emit("start-update-check"); // will start the update checker that binds to package-update will stop first if already running to avoid duplicates

Listenable Events

package-update

Emit Events

stop-update-check

start-update-check