Closed xenorio closed 5 years ago
I can't necessarily identify any situation in which tmi.js receiving a "CLEARMSG"
command would not result in the "messagedeleted"
event being fired. If Twitch doesn't send the event, there's nothing tmi.js can do.
Perhaps if the message is not being sent to the client as part of the "CLEARMSG"
. If you could collect raw IRC message instances of that happening I'd be interested.
client.connect().then(() => {
client.ws.on('message', message => {
const isClearMsg = message.includes(':tmi.twitch.tv CLEARMSG ');
if(!isClearMsg) {
return;
}
const isEmptyClearMsg = / :tmi\.twitch\.tv CLEARMSG #\w+ :\s*$/.test(message);
if(isEmptyClearMsg) {
console.log('Empty clear msg example:');
console.log(message);
}
});
});
I found out that i actually had some kind of bug on the website showing messages as deleted when they're not.
Actual behaviour: Sometimes there is no messagedeleted event fired when a message gets deleted by a moderator
Expected behaviour: Every deletion of a message should fire the event
Server configuration