Skip to content

Instantly share code, notes, and snippets.

@Toanzzz
Toanzzz / delete-slack-messages.js
Last active January 21, 2020 18:53 — forked from firatkucuk/delete-slack-messages.js
Deletes slack public/private channel and chat messages.
#!/usr/bin/env node
// Channel ID is on the the browser URL.: https://mycompany.slack.com/messages/MYCHANNELID/
// Token can get from: https://api.slack.com/custom-integrations/legacy-tokens
// Pass it as a parameter: node ./delete-slack-messages.js TOKEN CHANNEL_ID
// Or use it without download the script: curl -Ls RAW_GIST_URL | node - TOKEN CHANNEL_ID
// GLOBALS #############################################################################################################
const [, , token, channel, _delay = 300] = process.argv