Skip to content

Commit

Permalink
Merge pull request #2479 from crowbartools/v5
Browse files Browse the repository at this point in the history
v5.62.0
  • Loading branch information
zunderscore authored Mar 23, 2024
2 parents bc18f3d + 08dc0e2 commit 54bdec2
Show file tree
Hide file tree
Showing 230 changed files with 6,084 additions and 2,210 deletions.
5 changes: 4 additions & 1 deletion .github/release-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

## Linux Install
- Download Firebot-v{0}-linux-x64.tar.gz
- ?? will need further instructions
- Unpack Firebot-v{0}-linux-x64.tar.gz
- Change into the directory where you unpacked the archive
- Run the `Firebot v5` executable.
- This must either be done via a terminal window, or you will need to create a shortcut that includes the correct path for the unpacked archived as the "working directory".

**Note**: Linux does not receive auto-updates
246 changes: 130 additions & 116 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "firebotv5",
"version": "5.61.2",
"version": "5.62.0",
"description": "Powerful all-in-one bot for Twitch streamers.",
"main": "build/main.js",
"scripts": {
Expand Down Expand Up @@ -46,11 +46,11 @@
"@crowbartools/firebot-custom-scripts-types": "^5.53.2-6",
"@nut-tree/nut-js": "^3.1.1",
"@seald-io/nedb": "^4.0.4",
"@twurple/api": "^7.0.6",
"@twurple/auth": "^7.0.6",
"@twurple/chat": "^7.0.6",
"@twurple/eventsub-ws": "^7.0.6",
"@twurple/pubsub": "^7.0.6",
"@twurple/api": "^7.1.0",
"@twurple/auth": "^7.1.0",
"@twurple/chat": "^7.1.0",
"@twurple/eventsub-ws": "^7.1.0",
"@twurple/pubsub": "^7.1.0",
"@zunderscore/elgato-light-control": "^1.1.2",
"angular": "^1.8.0",
"angular-animate": "^1.7.8",
Expand Down Expand Up @@ -112,7 +112,7 @@
"node-hue-api": "^4.0.11",
"node-json-db": "^1.4.1",
"node-xlsx": "^0.20.0",
"obs-websocket-js": "^5.0.3",
"obs-websocket-js": "^5.0.5",
"request": "^2.85.0",
"roll": "^1.2.0",
"sanitize-filename": "^1.6.3",
Expand Down
11 changes: 9 additions & 2 deletions src/backend/app-management/electron/events/when-ready.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,19 @@ exports.whenReady = async () => {

windowManagement.updateSplashScreenStatus("Loading custom roles...");
const customRolesManager = require("../../../roles/custom-roles-manager");
customRolesManager.loadCustomRoles();
await customRolesManager.loadCustomRoles();

windowManagement.updateSplashScreenStatus("Loading known bot list...");
const chatRolesManager = require("../../../roles/chat-roles-manager");

windowManagement.updateSplashScreenStatus("Loading known bot list...");
await chatRolesManager.cacheViewerListBots();

windowManagement.updateSplashScreenStatus("Loading channel moderators...");
await chatRolesManager.loadModerators();

windowManagement.updateSplashScreenStatus("Loading channel VIPs...");
await chatRolesManager.loadVips();

windowManagement.updateSplashScreenStatus("Loading effect queues...");
const effectQueueManager = require("../../../effects/queues/effect-queue-manager");
effectQueueManager.loadItems();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ exports.windowsAllClosed = async () => {
const scheduledTaskManager = require("../../../timers/scheduled-task-manager");
scheduledTaskManager.stop();

// Stop all custom scripts so they can clean up
const customScriptRunner = require("../../../common/handlers/custom-scripts/custom-script-runner");
await customScriptRunner.stopAllScripts();

// Unregister all shortcuts.
const hotkeyManager = require("../../../hotkeys/hotkey-manager");
hotkeyManager.unregisterAllHotkeys();
Expand Down
37 changes: 27 additions & 10 deletions src/backend/app-management/electron/window-management.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ const { settings } = require("../../common/settings-access");

setupTitlebar();


/**
* The variable inspector window.
*@type {Electron.BrowserWindow}
*/
let variableInspectorWindow = null;

/**
* The stream preview popout window.
* Keeps a global reference of the window object, if you don't, the window will
Expand Down Expand Up @@ -83,8 +90,8 @@ function createStreamPreviewWindow() {
streamPreviewWindowState.manage(streamPreview);

streamPreview.on("close", () => {
if (!view.isDestroyed()) {
view.destroy();
if (!view.webContents.isDestroyed()) {
view.webContents.destroy();
}
});
}
Expand Down Expand Up @@ -428,7 +435,7 @@ async function createMainWindow() {
);

// wait for the main window's content to load, then show it
mainWindow.webContents.on("did-finish-load", () => {
mainWindow.webContents.on("did-finish-load", async () => {


createTray(mainWindow);
Expand All @@ -442,7 +449,7 @@ async function createMainWindow() {
}

const startupScriptsManager = require("../../common/handlers/custom-scripts/startup-scripts-manager");
startupScriptsManager.runStartupScripts();
await startupScriptsManager.runStartupScripts();

const eventManager = require("../../events/EventManager");
eventManager.triggerEvent("firebot", "firebot-started", {
Expand Down Expand Up @@ -470,8 +477,24 @@ async function createMainWindow() {
}).then(({response}) => {
if (response === 0) {
mainWindow.destroy();
global.renderWindow = null;
}
}).catch(() => console.log("Error with close app confirmation"));
} else {
mainWindow.destroy();
global.renderWindow = null;
}
});

mainWindow.on("closed", () => {
if (variableInspectorWindow?.isDestroyed() === false) {
logger.debug("Closing variable inspector window");
variableInspectorWindow.destroy();
}

if (streamPreview?.isDestroyed() === false) {
logger.debug("Closing stream preview window");
streamPreview.destroy();
}
});
}
Expand Down Expand Up @@ -525,12 +548,6 @@ function updateSplashScreenStatus(newStatus) {
splashscreenWindow.webContents.send("update-splash-screen-status", newStatus);
}

/**
* The variable inspector window.
*@type {Electron.BrowserWindow}
*/
let variableInspectorWindow = null;

async function createVariableInspectorWindow() {

if (variableInspectorWindow != null && !variableInspectorWindow.isDestroyed()) {
Expand Down
10 changes: 9 additions & 1 deletion src/backend/auth/twitch-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,27 @@ class TwitchAuthProviders {
'moderator:manage:chat_settings',
'moderator:manage:shield_mode',
'moderator:manage:shoutouts',
'moderator:manage:unban_requests',
'moderator:read:automod_settings',
'moderator:read:blocked_terms',
'moderator:read:chat_settings',
'moderator:read:chatters',
'moderator:read:followers',
'moderator:read:moderators',
'moderator:read:shield_mode',
'moderator:read:shoutouts',
'moderator:read:unban_requests',
'moderator:read:vips',
'user:edit:broadcast',
'user:manage:blocked_users',
'user:manage:whispers',
'user:read:blocked_users',
'user:read:broadcast',
'user:read:chat',
'user:read:emotes',
'user:read:follows',
'user:read:subscriptions',
'user:write:chat',
'whispers:edit',
'whispers:read'
]
Expand All @@ -105,6 +111,8 @@ class TwitchAuthProviders {
'moderator:manage:announcements',
'user:manage:whispers',
'user:read:chat',
'user:read:emotes',
'user:write:chat',
'whispers:edit',
'whispers:read'
]
Expand Down Expand Up @@ -141,7 +149,7 @@ async function getUserCurrent(accessToken: string) {
return null;
}

authManager.on("auth-success", async authData => {
authManager.on("auth-success", async (authData) => {
const { providerId, tokenData } = authData;

if (providerId === twitchAuthProviders.streamerAccountProviderId
Expand Down
Loading

0 comments on commit 54bdec2

Please sign in to comment.