michaeljolley/number-one

Banned messages show on screen

Opened this issue · 2 comments

We need to investigate if it is possible for this bot to 'see' if a message was banned, and if it was, to either not show the message or destroy the HTML object if it is on the DOM.

I'm curious if any events are thrown in chat on a banned message.

onMessageDeleted( id, extra ) Responds to chat message deleted

You'll be able to look for any messages with that ID and remove them from the visible messages on your overlay. Even better, to avoid even displaying fallout or reactions to a banned message, you could look for this event and have it remove the offending message and stop displaying messages for X minutes.