evi

For plugin authors

Plugin API changelog

What plugins can use in each Evi version: @evi/api, a plugin’s ctx, its manifest and the plugin tools. Authors with a plugin in the store hear about each release in their inbox, and about anything that touches their code.

Writing your first plugin? Read the plugin guide, or publish from your dashboard.

  1. Evi 1.3.1

    • Added

      ctx.panelToggle

      A switch in the user panel, beside mute and deafen: { label, tooltip, icon, isChecked, subscribe, alert, toggle }. One plugin's switch gets Discord's panel button of its own; with several, they share one Evi button that opens a menu of them, so the panel never grows by more than one icon. Use it instead of patching the panel yourself.

  2. Evi 1.1.0

    • Added

      locales

      A manifest field with the plugin's name, description and changelog notes in other languages: { "de": { "name": "…", "description": "…", "changelog": { "1.0.0": ["…"] } } }. The Plugins tab and the store show whichever matches Discord's language, English for anything left out. Themes take the same as @name:de and @description:de header lines.

    • Changed

      settings

      A setting's label, description and option labels are read each time the settings draw, so they can be getters that call your defineStrings t() and follow Discord's language.

    • Changed

      new-plugin

      New plugins come with a strings.ts using defineStrings, settings that follow the language, and a locales example in the manifest.

  3. Evi 1.0.0

    • Added

      ctx.keybind

      Runs a handler when the shortcut in one of the plugin's keybind settings is pressed, anywhere in Discord. The setting is read on every press, so a new shortcut applies at once, and the handler is removed when the plugin stops.

    • Added

      type: "keybind"

      A setting type for a keyboard shortcut the user records by pressing the keys, stored like "Ctrl+Shift+KeyG" ("" for none). The settings field says when two plugins want the same keys.

    • Added

      ctx.settings.schema

      A plugin's settings schema is readable from its context, as declared in its definition.

    • Added

      new-plugin

      bun run new-plugin <id> sets up a plugin that works as it is: a manifest, an index.tsx with a setting, a keyboard shortcut and a slash command, and a pure file with its test.

    • Added

      preview-plugin

      bun run preview-plugin <id> shows the plugin's store page and what the store's checks would say about it, before you upload.

  4. Evi 0.7.0

    • Added

      permissions

      Manifests declare what a plugin needs: the network hosts it contacts, and whether it reads messages, sends messages or changes settings. Evi blocks the rest of what it tries through Evi with a PluginPermissionError, and store uploads require the declaration.

    • Changed

      patches

      When a Discord update breaks a store plugin, Evi's team can hotfix its source patches and lookups without a new version. A patch is identified by its place in patches and its find, so keep patches in the same order between versions.

  5. Evi 0.5.0

    • Added

      defineStrings

      A plugin's own translations, by Discord's locale tags. English is required and is the fallback; it returns t(key, vars) with {placeholders} and plural forms.

    • Added

      useLocale

      React hook that re-renders a component when Discord's language changes.

    • Added

      I18n

      I18n.locale is the language Evi uses for its own UI, I18n.discordLocale the tag Discord has.