mirror of
https://github.com/RavenX8/companion-module-streamer.bot-api.git
synced 2026-04-03 12:48:54 -04:00
34 lines
634 B
JavaScript
34 lines
634 B
JavaScript
import { combineRgb } from '@companion-module/base'
|
|
|
|
export default async function (self) {
|
|
self.setFeedbackDefinitions({
|
|
ChannelState: {
|
|
name: 'Example Feedback',
|
|
type: 'boolean',
|
|
label: 'Channel State',
|
|
defaultStyle: {
|
|
bgcolor: combineRgb(255, 0, 0),
|
|
color: combineRgb(0, 0, 0),
|
|
},
|
|
options: [
|
|
{
|
|
id: 'num',
|
|
type: 'number',
|
|
label: 'Test',
|
|
default: 5,
|
|
min: 0,
|
|
max: 10,
|
|
},
|
|
],
|
|
callback: (feedback) => {
|
|
console.log('Hello world!', feedback.options.num)
|
|
if (feedback.options.num > 5) {
|
|
return true
|
|
} else {
|
|
return false
|
|
}
|
|
},
|
|
},
|
|
})
|
|
}
|