Equicord provides a robust and convenient API layer to accelerate plugin development. It simplifies state management, layout rendering, context menu patches, and command registration.
Define a toggleable plugin setting which will allow users to toggle a feature in your plugin’s settings modal:
// Define settings. This will return a reactive settings object.
// - To read: `const enableFeature = settings.store.coolFeature`
// - To write: `settings.store.coolFeature = false`
const settings = definePluginSettings({
coolFeature: {
type: OptionType.BOOLEAN,
description: "Enable a very cool feature",
default: true
}
});
export default definePlugin({
name: "MyCoolPlugin",
// You MUST include your plugin settings in your plugin definition or you will get an error!
settings
});
function ReactComponent() {
// Reactive subscription that will automatically update your component when the setting changes
const { coolFeature } = settings.use(["coolFeature"]);
return <div>{coolFeature ? "Cool feature is enabled" : "Cool feature is disabled"}</div>;
}
Message accessories are elements that appear below messages in chat, such as embeds.
Define the renderMessageAccessory method on your plugin object to make use of this feature. This is the easiest way to add custom elements to messages.
`definePlugin({
name: "MyCoolPlugin",
renderMessageAccessory(props) {
const { content } = props.message;
return (
<Paragraph size="sm" weight="bold">
<div>Wow this is a great message!</div>
{content.length > 1000 && <div>But wow it's long!!</div>}
</Paragraph>
);
}
});`
The message popover is the little bar that appears in the top-right corner of a message when you hover over it.
You define it via the messagePopoverButton property on your plugin object. The icon is used for Settings > Equicord > Plugins > Manage Plugin UI Elements. I’m not going to explain this further, just look at how the QuickMention plugin uses it.
definePlugin({
name: "MyCoolPlugin",
messagePopoverButton: {
icon: IconComponent,
render: ButtonComponent
}
});
definePluginSettings to output a reactive state store. Settings must be registered inside your main definition block to avoid runtime crashes. Components can cleanly subscribe to individual option changes dynamically.commands array. The API supports core command functionalities, execution callbacks, arguments, and sub-commands out of the box.contextMenus object by matching target interface IDs. It allows developers to seamlessly push custom action components onto existing context trays.