Skip to content

Commit

Permalink
make the channel true read-only
Browse files Browse the repository at this point in the history
  • Loading branch information
aboutdavid committed May 16, 2024
1 parent 72608b4 commit ed4432c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const app = new App({

let texts = await Promise.all(promises);
texts.push(`⌚ All times are in ${event.timezone}`)
texts.push(`🗑️ Messages here are automatically deleted. Please see #inbound-dev for more details.`)
let text = texts.join('\n');

let chunks = [];
Expand All @@ -101,7 +102,15 @@ const app = new App({
}
})
}
app.message(/.*/gim, async ({ message }) => {
const event = config.events.find(event => event.channel == message.channel)
if (event) await app.client.chat.delete({
channel: message.channel,
ts: message.ts,
token: process.env.SLACK_USER_TOKEN
})

})
await pull()
setInterval(pull, 1000 * 60 * 5)

Expand Down

0 comments on commit ed4432c

Please sign in to comment.