Skip to content

Instantly share code, notes, and snippets.

View itslevir's full-sized avatar

Levi itslevir

View GitHub Profile
@itslevir
itslevir / sendtodiscord.js
Created August 11, 2022 05:45
Send a random ID through discord console in DM
const getToken = () => {
return (webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m=>m?.exports?.default?.getToken!==void 0).exports.default.getToken()
}
fetch(`https://canary.discord.com/api/v9/channels/${new URL(location.href).pathname.split("/")[3]}/messages`, {
headers: {
"Authorization": getToken(),
"Content-Type": "application/json"
},
method: "POST",
body: JSON.stringify({