less racy

This commit is contained in:
Skye 2023-03-13 19:25:17 +09:00
parent 204b17533e
commit 97b74ec81f
Signed by: me
GPG key ID: 0104BC05F41B77B8

View file

@ -86,9 +86,11 @@ client.on("messageCreate", async (message) => {
after: message.id,
});
const nextMessage = msgsAfter.last();
const nextMessage = msgsAfter
.filter((msg) => msg.webhookId && message.content.includes(msg.content))
.last();
if (nextMessage?.webhookId) {
if (nextMessage) {
// pluralkit moment
// remove current message