Build with Endcord
Everything you need to fix a bug, write a plugin, translate Endcord or design something for it, in one place.
Nothing here matches that. Try a simpler word, or ask on the Discord server.
Set up
You need Node.js 22 or newer, pnpm and Git, plus Discord on your computer.
- Get the codeFork the repository on GitHub, then clone your fork.
git clone https://github.com/<your-username>/Endcord.git cd Endcord pnpm install - Build while you workThis rebuilds Endcord every time you save a file.
pnpm watch - Put your build into DiscordRun this once. Afterwards, press Ctrl+R in Discord to load your latest build.
pnpm inject - Check your workThe same checks run on GitHub when you open a pull request.
pnpm lint pnpm testTsc pnpm testSecurity
Test with a second Discord account or a test server where you can, not with your main account.
Your first plugin
A plugin is a folder in src/plugins with an index.ts that exports definePlugin().
- Make the folderCreate
src/plugins/helloPanda/index.ts. The folder name is camelCase; the plugin'snameis PascalCase. - Write the pluginThis one adds a
/pandacommand and a setting. Paste it in as it is; it builds./* * Endcord, a Discord client mod * Copyright (c) 2026 rootpoi and contributors * SPDX-License-Identifier: GPL-3.0-or-later */ import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, sendBotMessage } from "@api/Commands"; import { definePluginSettings } from "@api/Settings"; import { Devs } from "@utils/constants"; import definePlugin, { OptionType } from "@utils/types"; const settings = definePluginSettings({ sleepy: { type: OptionType.BOOLEAN, description: "The panda answers half asleep", default: true } }); export default definePlugin({ name: "HelloPanda", description: "Adds /panda, and the panda says hello back", authors: [Devs.rootpoi], // add yourself to Devs in src/utils/constants.ts settings, commands: [{ name: "panda", description: "Say hello to the panda", inputType: ApplicationCommandInputType.BUILT_IN, options: [{ name: "name", description: "Who's saying hello", type: ApplicationCommandOptionType.STRING, required: false }], execute(args, ctx) { const name = findOption(args, "name", "friend"); sendBotMessage(ctx.channel.id, { content: settings.store.sleepy ? `zzz… oh, hi ${name} 🐼` : `Hi ${name}! 🐼` }); } }] });definePluginSettingsmakes the settings page for you and gives you typed values insettings.store.ApplicationCommandInputType.BUILT_INlists the command with Discord's own, so it works in servers and DMs.sendBotMessageshows a reply only you can see. Nothing is sent to Discord.
- Turn it onRebuild, reload Discord, then open Endcord's settings and turn on HelloPanda. Type
/pandain any chat. - Change Discord itself with a patchWhen there's no API for what you need, a patch edits Discord's code as it loads.
findpicks the module andmatchandreplaceedit it;$selfis your plugin.patches: [{ // An illustration: real find strings come from reading Discord's code. // find is a piece of text that appears in exactly one of Discord's modules find: ".USER_PROFILE_MODAL", replacement: { // \i matches any minified name, so the patch survives Discord's rebuilds match: /(?<=user:(\i),)/, replace: "badge:$self.badgeFor($1)," } }], badgeFor(user) { return user.bot ? null : "🐼"; }Keep
findshort and unique, and match the meaning of the code rather than exact minified names, so the patch keeps working when Discord updates.
API reference
The APIs plugins use most. Each link opens its source, where every exported function has a comment saying what it does. To use one, add its plugin to your dependencies, for example dependencies: ["UserSettingsAPI"].
Slash commands that show up in Discord's command menu, with options and replies only you see.
SettingsTyped plugin settings with defaults, shown in the plugin's settings page automatically.
ContextMenuAdd items to Discord's right-click menus for messages, users, channels and servers.
MessageEventsRun code before a message is sent or edited, or when one is clicked.
MessageAccessoriesShow your own content under a message.
MessageDecorationsIcons and tags next to the author's name in chat.
MessagePopoverButtons in the toolbar that appears when you hover a message.
MessageUpdaterChange how a message already in the chat looks, without sending anything.
ChatButtonsButtons next to the message box.
BadgesBadges on user profiles.
MemberListDecoratorsIcons beside names in the member list.
NicknameIconsIcons beside nicknames in profiles.
ProfileSectionsYour own sections inside user profiles.
ServerListElements above or below the server list.
UserAreaButtons in the user panel at the bottom left.
HeaderBarButtons in the bar at the top of a channel.
NoticesThe notice bar across the top of Discord.
NotificationsEndcord's own pop-up notifications, with a log.
UserSettingsRead and change Discord's own settings, like your custom status.
DataStoreSave larger data on the user's computer, outside the settings file.
StylesAdd and remove CSS while a plugin runs.
ThemesLoad and manage the user's themes.
WebpackFind Discord's own modules, stores and components: findByProps, findStore, findComponentByCode and lazy versions of each.
The rest of the APIs, and the helpers in src/utils, are in the source. How the pieces fit together is in ARCHITECTURE.md.
Getting your change merged
Open a pull request against main with a short description of what changed and why, and a screenshot for anything you can see. A maintainer reviews it, usually asks for a change or two, and merges it once the checks pass.
Every change needs
- Lint, the type check and the security tests passing
- No growth in the bundle past the size limit
- New user-facing text in all five languages. If you don't speak one, say so in the pull request
- Settings that hold keys, tokens or addresses marked
sensitive, so they never leave the computer - Your entry in
Devsinsrc/utils/constants.tsif you wrote a plugin
We don't accept
- Token loggers, self-bots, spam, raid or mass-delete tools
- Fake mute or deafen, or anything that misleads people in voice
- Sending tokens, messages or private data to services we haven't checked
- Plugins that need a paid key to work at all
- Large npm packages for small jobs
The full guidelines are in CONTRIBUTING.md, and how we treat each other is in the Code of Conduct.
Translations and docs
Endcord speaks English, Turkish, French, Spanish and Russian.
Every piece of text is written in English in the code and looked up in a file per language. To translate, add the English text as the key and your translation as the value:
// src/utils/i18n/locales/tr.ts
"Say hello to the panda": "Pandaya merhaba de",
// src/utils/i18n/pluginDescriptions/tr.ts
HelloPanda: "/panda komutunu ekler, panda da sana merhaba der.",To fix a translation, change the value and open a pull request; you don't need to build anything. To add a new language, ask on the Discord server first so we can set up its files.
Documentation lives in docs/. The decision records there explain why things are the way they are, like signed updates and rollback. Fixes to them are as welcome as fixes to code.
Design resources
Every Endcord screen uses the same night-blue colours, whatever Discord theme the user has. Use the CSS variables, not fixed colours, so your plugin fits in.
Stuck?
Ask on the Discord server, or open an issue if something looks broken. Security problems go to the Trust Center instead.
