Encountered an error while using Electron:
This is my code for a Better Discord add-on written in JavaScript. I am relatively new to JS, so any assistance would be greatly appreciated. Thank you.
//META{"name":"BetterTouchbar"}*//
const { app, BrowserWindow, TouchBar, TouchBarButton} = require('electron');
class BetterTouchbar {
// Constructor
constructor() {
this.initialized = false;
}
// Meta Information
getName() { return "BetterTouchbar"; }
getShortName() { return "BT"; }
getDescription() { return "eekZ"; }
getVersion() { return "0.1.0"; }
getAuthor() { return "Aj3douglas"; }
start(){
const button = new TouchBarButton({
label: "a",
backgroundColor: "#FF0000",
accessibilityLabel: "a",
click: ()=>{
console.log("Clicked a button")
}
});
const touchBar = new TouchBar({
items: [button],
})
window.setTouchBar(touchBar)
}
}