Describe it with a manifest
Every addon starts with a manifest: the metadata Unbound uses to list, attribute, and validate it. Create a
manifest.json with at least the required fields.manifest.json
main points at your entry file, and id is the name you’ll use everywhere else. See the manifest for the full field list.Write the entry point
Your
main file exports a default object with optional start and stop hooks. Unbound calls start when the plugin is enabled and stop when it’s disabled. Set everything up in start; undo it all in stop.index.ts
Find what you want to change
Use Metro to locate the Discord module you need. Declare the handle lazily so the search doesn’t run until the plugin is actually active.
Patch it
Wrap the function with the patcher. Create a patcher scoped to your plugin so every patch can be reverted together.
Remember a setting
Persist configuration with storage. Scope a store to your plugin id and read or write keys on it. Values survive a reload for free.
The full plugin
Putting the steps together:index.ts
Where to go next
Function Patching
The full patcher API: before, after, instead, and typing.
Patching Components
Change what Discord’s components render.
Flux Stores
Read Discord’s state and react to its events.
Debugging
Tools for developing and inspecting your addon.