-
Notifications
You must be signed in to change notification settings - Fork 1
Merging upstream #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merging upstream #37
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -104,7 +104,7 @@ function loadFiles() { | |
| } | ||
|
|
||
| function myCallback() { | ||
| console.debug(`Saved ${jsonItems}`); | ||
| console.debug(`Saved ${jsonItems.length} items.`); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Misleading Item Count in Debug OutputThe debug message uses |
||
| } | ||
|
|
||
| function saveItems(collectedItems, filename) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,17 +67,14 @@ async function postInChat(message, trap, bounced) { | |
| if (trap) { | ||
| // Trap message triggers additional trap-related actions with response | ||
| await sendMessage(message); | ||
| const response = await streamerbotclient.doAction(config.streamerbotActions.trapMessage, { | ||
| customEventResponse: true | ||
| }); | ||
| const response = await streamerbotclient.doAction( | ||
| config.streamerbotActions.trapMessage, | ||
| { "timedOutUser": "Chat" }, | ||
| { customEventResponse: true } | ||
| ); | ||
| console.debug('ResponseCustomEventResponseArgs:', response.customEventResponseArgs); | ||
| return response.customEventResponseArgs.randomUser0 || "Chat"; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Regression: Unsafe Data Access Causes ErrorsThe code accesses |
||
|
|
||
| // Extract the timedOutUser argument from the response | ||
| if (response.customEventResponseArgs && response.customEventResponseArgs.timedOutUser) { | ||
| console.log('Chat user died:', response.customEventResponseArgs.timedOutUser); | ||
| return response.customEventResponseArgs.timedOutUser; | ||
| } | ||
|
|
||
| return response; | ||
| } else if (bounced) { | ||
| // Bounced message enables emote mode for 30 seconds | ||
| await sendMessage(message); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Data Mismatch Breaks Countdown State
The countdown flag check uses
.includes(696969)with a primitive number, butnotifiedItemsnow stores objects with{ id, locationId }structure. This check will always fail since.includes()compares objects by reference, breaking countdown state tracking.