ajanata / PretendYoureXyzzy

A web clone of the card game Cards Against Humanity.
https://pretendyoure.xyz/zy
BSD 2-Clause "Simplified" License
1.23k stars 396 forks source link

How can I call a JS function each time a message was received? #195

Closed Benji-Collins closed 5 years ago

Benji-Collins commented 5 years ago

Where is the main 'messaged received' function(s) in the CAH scripts? I’m also interested in the ‘player joined the game’ function(s). Thanks.

devgianlu commented 5 years ago

Do you mean a chat message?

On Mon, Oct 29, 2018, 05:45 Benji-Collins notifications@github.com wrote:

Where is the main 'messaged received' function in the CAH scripts? Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ajanata/PretendYoureXyzzy/issues/195, or mute the thread https://github.com/notifications/unsubscribe-auth/AOI-8S13lgCnyPSxoUs-X2qSTdhoCapgks5upofwgaJpZM4X-dND .

Benji-Collins commented 5 years ago

I think I just found it. The cah.log.status_with_game function in cah.log.js. Seems to be working as I was looking for. Now I'm just trying to work out how to remove the timestamp from messages.