Skip to content

Instantly share code, notes, and snippets.

View johnpyp's full-sized avatar

johnpyp

  • Amazon
  • Seattle, WA
  • 18:38 (UTC -07:00)
View GitHub Profile
@johnpyp
johnpyp / delete-all-messages.js
Created October 25, 2019 21:08 — forked from rcx/delete-all-messages.js
Delete all your messages in a Discord channel
/*
* Discord: Don't copy stuff into this box
* Me: dOn'T COpy sTuFf iNtO tHIs bOx
*/
clearMessages = function (guild_id, author_id, authToken, deleted = new Set()) {
const searchURL = `https://discordapp.com/api/v6/guilds/${guild_id}/messages/search?author_id=${author_id}&include_nsfw=true`
const headers = { Authorization: authToken }
let clock = 0
interval = 500
function delay(duration) {