Skip to main content
Discord state changes are dispatched through Flux. Illegalcord plugins can listen to those actions through the declarative flux field.

Declarative flux

PluginManager subscribes and unsubscribes declarative Flux handlers for you. It also wraps handlers and logs thrown errors.

Common event names

Event payloads are internal Discord objects and can change. Type only the fields you read.

Manual subscriptions

Use manual FluxDispatcher.subscribe only for scoped React effects or late conditional subscriptions. Always keep the same function reference and unsubscribe it.
Do not use both declarative flux and manual subscribe for the same event in the same plugin.