generated from array-in-a-matrix/matrix-bot-template
reversed the bot, delete messages that start with prefix instead
This commit is contained in:
parent
fa4bfb1720
commit
4f8826fda7
1 changed files with 1 additions and 1 deletions
2
index.js
2
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue