Skip to content

An unofficial Replugged plugin template

Notifications You must be signed in to change notification settings

Penguin-Spy/replugged-plugin-template

Repository files navigation

THIS IS NOT THE OFFICIAL PLUGIN TEMPLATE

you should use the real one instead!!


This is an unofficial template for replugged plugins, without Typescript support or linting!
it still supports bundling the plugin into an .asar and installing it into Replugged automatically when files change.
It also supports JSX, albeit with some slightly more specific syntax (tags must be enclosed in parenthesis that come after "return" or "=", and you have to be careful with curly braces inside inline-javascript)

this was created for personal use because:

  • i hate the computer telling me what code i can and can't write
  • trying to type a Discord mod is somewhat annoying
  • idk it sounded kinda fun

Prerequisites

Install

  1. Create a copy of this template
  2. Clone your new repository and cd into it
  3. Install dependencies: pnpm i
  4. Edit the manifest.json and change at least the "id" to be something different!
  5. Install the plugin into Replugged: pnpm run update
  6. Reload Discord to load the plugin

The unmodified plugin will log "Typing prevented" in the console when you start typing in any channel.

Development

Official Replugged API docs: https://docs.replugged.dev/modules.html (have fun)

pnpm run update will copy the plugin into the Replugged plugins folder.
pnpm run watch will do this automatically whenever a file changes (you still have to reload Discord)

Distribution

pnpm run bundle will create an .asar of the plugin that's ready for distributing via the #plugin-links channel, GitHub releases, email, FTP, dial-up modem, or USB drive + carrier pigeon.

This template includes a GitHub workflow that bundles the plugin and releases the .asar. To trigger it, push a tag with the version number preceded by a v (e.g. v1.0.0):

git tag v1.0.0
git push --tags

The Replugged updater will automatically check for updates on the repository specified in the manifest. Make sure to update it to point to the correct repository!