Casterlabs / caffeinated

The code for Caffeinated.
https://casterlabs.co?ref=github_caffeinated
Other
18 stars 1 forks source link

Twitch Point Redeems With Global Cooldowns Not Appearing #59

Closed tmarkn closed 8 months ago

tmarkn commented 8 months ago

When a user redeems a reward with a Global cooldown (In Twitch: "Redemption Cooldown Time"), it does not appear in Caffeinated's Activity Feed.

Here are the lines from App.log (with ids and names censored)

[WARN  ] [AuthInstance Koi (twitch)] Unsupported event type: CHANNEL_POINTS
[SEVERE] [KoiConnection.KoiSocket] {"event":{"reward":{"global_cooldown":{"is_enabled":true,"global_cooldown_seconds":120},"cost":100,"cooldown_expires_at":"2024-02-06T21:21:18Z","title":"Apple Juice (Hydrate)!","is_enabled":true,"is_in_stock":false,"default_reward_image":"https://static-cdn.jtvnw.net/custom-reward-images/default-4.png","background_color":"#FF0000","max_per_user_per_stream":{"is_enabled":false,"max_per_user_per_stream":0},"is_paused":false,"is_user_input_required":false,"reward_image":"https://static-cdn.jtvnw.net/custom-reward-images/########/30c96e0d-21b4-4f2e-aa58-cbf2c48d942b/ca963ee2-0c51-4ab0-ae59-f5fd5ea933a6/custom-4.png","max_per_stream":{"is_enabled":false,"max_per_stream":0},"is_sub_only":false,"id":"30c96e0d-21b4-4f2e-aa58-cbf2c48d942b","prompt":"Apple Juice Superiority "},"streamer":{"id":"########","channel_id":"########","platform":"TWITCH","UPID":"########;TWITCH"},"sender":{"badges":[],"image_link":"https://static-cdn.jtvnw.net/link/link/link/link","color":"#3EFFFF","subscriber_count":-1,"roles":[],"displayname":"USERNAME","followers_count":-1,"bio":"Welcome to the Beautiful Wave Digital Resort! I am the host for your stay, USERNAME. Please take up a cup of Apple/Orange juice, sit back, and relax. \u7f8e\u6ce2\u30c7\u30b8\u30bf\u30eb\u30ea\u30be\u30fc\u30c8\u3078\u3088\u3046\u3053\u305d\uff01\u3042\u306a\u305f\u306e\u30db\u30b9\u30c8\u3067\u7f8e\u6ce2\u30c1\u30de\u30fc\u3068\u7533\u3057\u307e\u3059\u3002\u30aa\u30ec\u30f3\u30b8\u30b8\u30e5\u30fc\u30b9\uff0f\u30ea\u30f3\u30b4\u30b8\u30e5\u30fc\u30b9\u3092\u53d6\u3063\u3066\u30ea\u30e9\u30c3\u30af\u30b9\u3057\u3066\u304a\u9858\u3044\u3057\u307e\u3059\u3002","id":"########","channel_id":"########","platform":"TWITCH","username":"USERNAME","UPID":"########;TWITCH","link":"https://twitch.tv/USERNAME"},"id":"chat:71138a4c-e941-4974-9fc2-a424361bb114","message":null,"status":"UNFULFILLED","timestamp":"2024-02-06T21:19:18.706671280Z","event_type":"CHANNEL_POINTS","event_abilities":{"upvotable":false,"deletable":false}},"type":"EVENT"}
[SEVERE] [AuthInstance (-#########) ?] java.lang.NullPointerException: event is marked non-null but is null
[SEVERE] [AuthInstance (-#########) ?]  at co.casterlabs.koi.api.listener.KoiEventUtil.reflectInvoke(KoiEventUtil.java:11)
[SEVERE] [AuthInstance (-#########) ?]  at co.casterlabs.koi.api.KoiConnection$KoiSocket.onMessage(KoiConnection.java:207)
[SEVERE] [AuthInstance (-#########) ?]  at org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:636)
[SEVERE] [AuthInstance (-#########) ?]  at org.java_websocket.drafts.Draft_6455.processFrameText(Draft_6455.java:986)
[SEVERE] [AuthInstance (-#########) ?]  at org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:910)
[SEVERE] [AuthInstance (-#########) ?]  at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:401)
[SEVERE] [AuthInstance (-#########) ?]  at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:233)
[SEVERE] [AuthInstance (-#########) ?]  at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:516)
[SEVERE] [AuthInstance (-#########) ?]  at java.base/java.lang.Thread.run(Unknown Source)

Note: May also want to test for Max Per Stream (In Twitch: "Limit Redemptions Per Stream") and Max Per User Per Stream (In Twitch: "Limit Redemptions Per User Per Stream")

e3ndr commented 8 months ago

Building out a beta release. LMK if it solves your issue. https://github.com/Casterlabs/caffeinated/releases/tag/1.2-babbea93-beta

(Refer to this channel in the Discord on how to switch to the beta branch)

tmarkn commented 8 months ago

Yup, seems to be fixed in the beta release!

e3ndr commented 8 months ago

PogChamp!