Skip to content
Merged

v5.61.2 #2409

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "firebotv5",
"version": "5.61.1",
"version": "5.61.2",
"description": "Powerful all-in-one bot for Twitch streamers.",
"main": "build/main.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/backend/restrictions/builtin/channel-currency.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const model = {
await currencyManager.adjustCurrencyForViewer(
username,
currencyId,
-Math.abs(currencyAmount) // force value negative to make it deduct the amount from user
0 - Math.abs(currencyAmount) // force value negative to make it deduct the amount from user
);
}
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { ReplaceVariable } from "../../../../types/variables";
import { OutputDataType, VariableCategory } from "../../../../shared/variable-constants";

const model : ReplaceVariable = {
definition: {
handle: "#name",
usage: "#name",
description: 'Retrieves the preset-list arg of the give name',
examples: [
{
usage: '#example',
description: "Returns the value of the preset-list arg 'example'; Synonymous with $presetListArgs[example]"
}
],
categories: [VariableCategory.ADVANCED],
possibleDataOutput: [OutputDataType.ALL],
spoof: true
}
};

export default model;
6 changes: 6 additions & 0 deletions src/backend/variables/replace-variable-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ class ReplaceVariableManager extends EventEmitter {
}
return result == null ? null : result;
}
})],
['#', name => ({
evaluator: (trigger) => {
const arg = (trigger.metadata?.presetListArgs || {})[name];
return arg == null ? null : arg;
}
})]
]),
onlyValidate: !!onlyValidate
Expand Down
4 changes: 2 additions & 2 deletions src/backend/viewers/viewer-online-status-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class ViewerOnlineStatusManager {
await this.setAllViewersOffline();

// update online viewer's lastSeen prop every minute
this._updateLastSeenIntervalId = setInterval(this.setLastSeenDateTime, 60000);
this._updateLastSeenIntervalId = setInterval(async () => await this.setLastSeenDateTime(), 60000);

// Update online viewer minutes every 15 minutes.
this._updateTimeIntervalId = setInterval(this.calcAllViewersOnlineMinutes, 900000);
this._updateTimeIntervalId = setInterval(async () => await this.calcAllViewersOnlineMinutes(), 900000);
});

frontendCommunicator.onAsync("disconnect-viewer-db", async () => {
Expand Down