Introduction
PhoenixCord is a client mod for Discord’s native desktop client. These docs explain how to write plugins for it.
How plugins work
Section titled “How plugins work”A plugin is a WebAssembly component. It exports one interface, plugin, and calls the interfaces PhoenixCord provides:
| Interface | What it is for |
|---|---|
plugin |
Implemented by your plugin: metadata, lifecycle, events and hooks |
host |
Settings, storage, timers, HTTP, logging, toasts, notifications, modals, clipboard |
client |
Reading Discord state: users, guilds, channels, messages, presence, permissions |
actions |
Acting as the user: sending messages, reacting, navigating, calling Discord’s API |
types |
Every data type the interfaces exchange |
The API is defined once, in WIT. Bindings for each language are generated from that definition, so every language sees the same API with the same documentation.
Plugins never touch Discord’s internals. They describe what they want, for example “add this button next to the message input” or “replace this message’s content before it is sent”, and PhoenixCord does it. That is why a Discord update only ever needs a PhoenixCord update.
Where to start
Section titled “Where to start”- Getting started builds your first plugin
- Plugin basics explains metadata, lifecycle and hooks
- API reference lists every function and type
- Plugin list shows the plugins that ship with PhoenixCord