These docs have been generated using AI. Expect inaccuracies until we remove this banner.
- Docs
- Developers
- Troy Embed
Troy Embed
Troy Embed is a code snippet you paste into your plugin. When your plugin loads, it silently installs and activates Troy Client if missing.
Note:
Consider using Packages instead. If you distribute via a Troy Package, Troy Client is included automatically. Troy Embed is for when you can't use Packages—like distributing through other marketplaces.
The Snippet
Get the latest version from GitHub:
Include it in your plugin, or paste the code directly into your main plugin file.
How It Works
- Your plugin loads
- Snippet checks if Troy Client is active
- If not, downloads and installs it silently
- User sees nothing—it just works
The entire snippet is under 60 lines and adds about 2KB to your plugin.
When to Use Troy Embed
- You're distributing through a marketplace that doesn't allow bundled plugins
- You want zero installation friction
- You don't need user feedback during installation
When Not to Use It
- Use Packages if you control distribution—cleaner for everyone
- Use Troy Installer if you need to install multiple plugins or want progress feedback
Source
The snippet is MIT licensed. Copy it, modify it, ship it.
→ View on GitHub
