How does features and events work?
✨ Welcome to Events & Features section!
Features
const { Feature } = require('sl-commands')
new Feature()
/** This will be executed once when the handler starts */
.setInit(({ client, handler }) => {
console.log('This will be ran once.')
})
/** This will be executed continuously with the interval of your choice */
.addTimed(({ client, handler }) => {
console.log('This will be ran every 5 seconds.')
}, 5000) // 1000 = 1 secondimport { Feature } from 'sl-commands'
new Feature()
/** This will be executed once when the handler starts */
.setInit(({ client, handler }) => {
console.log('This will be ran once.')
})
/** This will be executed continuously with the interval of your choice */
.addTimed(({ client, handler }) => {
console.log('This will be ran every 5 seconds.')
}, 5000) // 1000 = 1 secondEvents
Last updated