Firebot
Firebot copied to clipboard
[Bug] Twurple error when receiving whispers
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
We are getting a twurple error when receiving a whisper. This prevents whispers from triggering commands right now
Expected Behavior
No response
Steps To Reproduce
No response
Version
Current
What operating system are you using Firebot on?
Windows 11
Relevant log output
error: Unhandled promise rejection
{
message: "Cannot read property 'login' of undefined",
stack: "TypeError: Cannot read property 'login' of undefined\n" +
' at PubSubWhisperMessage.get senderName [as senderName] (/Users/ebiggz/repos/personal/Firebot/node_modules/@twurple/pubsub/lib/messages/PubSubWhisperMessage.js:26:62)\n' +
' at PubSubListener._callback (/Users/ebiggz/repos/personal/Firebot/backend/twitch-api/pubsub/pubsub-client.js:94:64)\n' +
' at PubSubListener.call (/Users/ebiggz/repos/personal/Firebot/node_modules/@twurple/pubsub/lib/PubSubListener.js:38:14)\n' +
' at /Users/ebiggz/repos/personal/Firebot/node_modules/@twurple/pubsub/lib/SingleUserPubSubClient.js:40:30\n' +
' at processTicksAndRejections (internal/process/task_queues.js:93:5)'
}
Contact Details (Optional)
No response
This is a bug in Twurple itself. When whispers are received, PubSub will sometimes send two separate event types: one for the whisper itself and one for Twitch's spam rating stuff. Right now, when Twurple's PubSub implementation receives a whisper event, it doesn't differentiate between the two message types before attempting to fire the event.
So just to add onto this since I'm not sure if twurple is aware of the bug or a temp fix can be done with the information I have. It seems like if you create a "whisper event" with just a "chat effect" of hi, the 1st whisper you do triggers the event fine, but after that 1st whisper, it no longer triggers the "whisper event" unless you delete the command and make a new one.