The Paul Blart event in miskeeping.js does not account for edits
In events/miskeeping.js, function paulBlart
is called every message create. Within that function, it checks if the message has been sent in the #paul-blart channel in Miskeeping's Discord guild, and if it is, check if it says "Paul Blart". This code makes it so that you can only say "Paul Blart".
However, there is one flaw: the messageUpdate event is not being listened to. Therefore, someone can post Paul Blart and then edit it to not be Paul Blart, but it will not be deleted.
You can probably solve this by making a new function that listens for messageUpdate, and check if it it's in Paul Blart. If the text mismatch (msg.content) and it was an edit (messageUpdate is called for a lot of reasons, deleting it might be one of them?), delete the message.
Originally discovered by ❃ Serily ❃#2593 <@681208952524111934>
.