Skip to content

Instantly share code, notes, and snippets.

@modeco80
Created October 26, 2019 17:45
Show Gist options
  • Save modeco80/b1772cf02faaf2c651377bccb6d06042 to your computer and use it in GitHub Desktop.
Save modeco80/b1772cf02faaf2c651377bccb6d06042 to your computer and use it in GitHub Desktop.
Some stuff to mess around with Discord webpack stuff
var modules = Object.values(webpackJsonp.push([
[],
{
['']: (_,e,r) => {
e.cache=r.c
}
},
[
['']
]
]).cache);
var Message = modules.find((e) => {
if(e && e.exports && e.exports.default) {
if(e.exports.default.createBotMessage) {
return true;
}
}
}).exports.default;
var MessageActions = modules.find((e) => {
if(e && e.exports && e.exports.default) {
if(e.exports.default.receiveMessage) {
return true;
}
}
}).exports.default;
// A snippet to find additional APIs
modules.forEach((module, index) => {
try {
if(typeof(module.exports.default) === "object") {
for(var exp in module.exports.default) {
console.log("\'" + exp + "\' in module id", module.i, "(index", index, ")");
}
} else {
if(module.exports.default !== undefined)
console.log(index, module.i, module.exports.default);
}
} catch {
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment