Skip to main content
Illegalcord plugins should reuse the UI and helper APIs already exposed by the project. Avoid hand-rolled controls when Discord or the local component library already provides one.

Settings

Use definePluginSettings from @api/Settings and OptionType from @utils/types.
Read settings in runtime code with settings.store. In React components, subscribe only to the keys you need:

Toasts

Use Discord’s toast helpers from @webpack/common:

Modals

Use modal helpers from @utils/modal and Discord or local components for controls.

Injected React components

Wrap injected render functions with ErrorBoundary.wrap.

UI imports

Do not import React from react in plugin UI. Use React and hooks from @webpack/common.