Skip to content

Instantly share code, notes, and snippets.

@EliseZeroTwo
EliseZeroTwo / deleteDiscordMessages.js
Created June 12, 2019 03:54 — forked from victornpb/deleteDiscordMessages.js
Delete all your messages from DM or Channel in Discord
//Paste this function in DevTools console inside Discord
/**
* Delete all messages in a Discord channel or DM
* @param {string} authToken Your authorization token
* @param {string} authorId Author of the messages you want to delete
* @param {string} channelId Channel were the messages are located
* @param {string} afterMessageId Only delete messages after this, leave blank do delete all
* @author Victornpb <https://www.github.com/victornpb>
* @see https://gist.github.com/victornpb/135f5b346dea4decfc8f63ad7d9cc182
def get_tweak(self, sector):
'''Gets tweak for use in XEX.'''
tweak = 0
for i in xrange(0x10): # 0x10 = block_size
tweak |= (sector & 0xFF) << ((0x10 - i - 1) * 8)
sector >>= 8
return tweak
def get_nintendo_tweak(self, sector):
'''Gets Nintendo tweak for use in XEX.'''