Skip to content

Instantly share code, notes, and snippets.

View jsnns's full-sized avatar
🚀

Jacob Sansbury jsnns

🚀
View GitHub Profile
@jsnns
jsnns / delete-all-messages.js
Created November 13, 2019 22:33 — 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) {