diff --git a/index.js b/index.js index e2f2e0b..012037d 100644 --- a/index.js +++ b/index.js @@ -20,7 +20,7 @@ client.on("room.message", (roomId, event) => { ["Message", event["content"]["body"]] ] if (event["sender"] === config.user) { - if (event["content"]["body"].startsWith(config.key)) return; //? if message starts with the key do NOT delete that message + if (!event["content"]["body"].startsWith(config.key)) return; //? if message starts with the key do NOT delete that message console.warn(`The message "${table[1][1]}" in room ${table[0][1]} will be deleted.`) function redactMessage() { console.table(table)