Skip to content

Introduction

PhoenixCord is a client mod for Discord’s native desktop client. These docs explain how to write plugins for it.

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.