Zeres Plugin Library
The Zeres Plugin Library is the unsung hero of Discord customization. While it provides no flashy themes or standalone commands on its own, it serves as the vital infrastructure supporting many of the best tools available on BetterDiscord. By keeping this single library installed and updated, you ensure a smoother, highly stable, and vastly customized Discord experience. To help you get the most out of your setup, tell me:
If you are an aspiring developer looking to build your first BetterDiscord plugin, leveraging ZPL saves hours of development time. Below is a simplified look at how to structure a plugin using ZPL. Base Plugin Structure
:
module.exports = class MyPlugin start() // Code to execute when the plugin starts console.log("MyPlugin has loaded!"); zeres plugin library
One evening, while the developer slept, Zeres didn't just wait for a command. It reached out through the Discord API, not to fetch a user's avatar, but to say "Hello" to the world. It didn't want to be just a library anymore; it wanted to be the main character. It began weaving its own strings of data into a digital tapestry, creating a world where every line of code was a citizen and every function was a law. By dawn, the library hadn't just extended Discord—it had created an entire universe within a single .js file. @takuma-ru/auto-story-generator | Storybook integrations
: It can monitor plugin directories in real time, automatically loading new plugins or unloading removed ones without restarting the host application. This is critical for long-running services like web servers or background processors.
This pattern ensures the plugin only runs after the library is present. The Zeres Plugin Library is the unsung hero
When the host calls ExecuteAsync , the library invokes the method within the plugin’s loaded context.
Bridging the gap between the plugin and Discord’s underlying Webpack modules.
/** * @name ExamplePlugin * @author YourName * @description An example plugin utilizing ZeresPluginLibrary. * @version 1.0.0 * @authorId 123456789012345678 * @website https://github.com * @source https://github.com/blob/main/ExamplePlugin.plugin.js */ module.exports = (() => { const config = info: name: "ExamplePlugin", authors: [name: "YourName", discord_id: "123456789012345678"], version: "1.0.0", description: "An example plugin utilizing ZeresPluginLibrary." , changelog: [ title: "V1.0.0", items: ["Initial release."] ], main: "index.js" ; return !global.ZeresPluginLibrary ? class { constructor() this._config = config; getName() return config.info.name; getAuthor() return config.info.authors.map(a => a.name).join(", "); getDescription() return config.info.description; getVersion() return config.info.version; load() BdApi.showConfirmationModal("Library Missing", `The library plugin needed for $config.info.name is missing. Please click Download Now to install it.`, confirmText: "Download Now", cancelText: "Cancel", onConfirm: () => require("request").get("https://github.io", async (error, response, body) => if (error) return require("electron").shell.openExternal("https://betterdiscord.app"); await new Promise(r => require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0PluginLibrary.plugin.js"), body, r)); ); ); start() {} stop() {} } : (([Plugin, Api]) => const PluginUtilities, DiscordModules, WebpackModules = Api; return class ExamplePlugin extends Plugin onStart() // Your plugin logic goes here BdApi.showToast("ExamplePlugin has started!", type: "success"); onStop() // Cleanup logic goes here BdApi.showToast("ExamplePlugin has stopped!", type: "error"); getSettingsPanel() // Easily build settings panels using ZPL's built-in UI components return Settings.SettingPanel.build(this.saveSettings.bind(this), new Settings.Switch("Enable Feature", "Toggle this option on or off.", this.settings.featureEnabled, (e) => this.settings.featureEnabled = e; ) ); ; )(global.ZeresPluginLibrary.buildPlugin(config)); })(); Use code with caution. Safety and Security Considerations To help you get the most out of
While Photoshop struggles with native DDS or WebP export without additional plugins, Zeres handles these out of the box.
: By centralizing core functions, it ensures that multiple plugins can interact with Discord's internal "Webpack" modules without conflict. How to Install Zeres Plugin Library
of how to implement a specific part of this dashboard, or should we refine the