Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

0. getModule and Webpack

Sammy edited this page Dec 17, 2021 · 1 revision

Modules

Modules are a Vital part of Plugin Development, they can get you access or info to all sorts discord components.

Vendicated made a nice little Plugin that makes Searching for Specific Modules a lot easier, I cannot recommend it enough.

A Hard Requirement for using Modules is the getModule Import, which you can get by using

const { getModule } = require("powercord/webpack");

Once you got that, you can use the getModule() Function and grab things from Discords Webpack

const { getModule } = require ("powercord/webpack");

[...]
  startPlugin() {
    console.log(getModule(['getCurrentUser'], false)); // true makes powercord retry if the module isnt found. Its recommended to keep it at true.
  }
[...]
Clone this wiki locally