(node:59108) UnhandledPromiseRejectionWarning: TypeError: strMessage.trim is not a function at BidirectionalWebsocketRouter._routeMessage (H:\StationneerDev\DiscordBot\node_modules\jsonrpc-bidirectional\src\BidirectionalWebsocketRouter.js:167:18)
Took me a while to trace this down. WebSocket returns not a string but a Buffer Object you can check out the code for it here
https://github.com/websockets/ws/blob/master/lib/buffer-util.js
I did a quick hack of`
strMessage = `${strMessage}`;
just to get my crappy project done.
As a side note I hate HATE this bug. I run in to ".trim is not a function" all the time and would of expected ws to guarantee string text messages:P