Discord Sync
Syncs Discord guilds, channels, members, and roles into Payload collections on demand, over HTTP, or on a cron schedule via discord.js.
Installation
pnpm add @lizardglobal/payload-discord-sync About
This plugin pulls Discord guilds, channels, members, and roles into Payload collections using discord.js. A bot token connects the client, and syncs run on demand from the admin panel, through a programmatic API, over an HTTP endpoint, or on a cron schedule via Payload jobs. Each synced document keeps a `raw` JSON snapshot from Discord plus a `lastSyncedAt` timestamp, so you can query or display the data like any other Payload content. Four collections are registered by default: `discord-guilds`, `discord-channels`, `discord-members`, and `discord-roles`. Every resource can be disabled, renamed, or extended with custom fields through the `resources` option, and a `collectionOverride` hook lets you replace the whole collection config. Member sync needs the Server Members Intent enabled on the bot, and emails only come through when you link members to your users collection via OAuth. The `linkUsers` option connects Discord members to your auth or users collection. It injects a `discordId` field, sets a relationship on members, and can auto-link during sync by Discord ID or email. A `linkDiscordUser` helper handles programmatic linking after a Discord OAuth flow, and `unlinkDiscordUser` reverses it. Sync is on-demand or scheduled; the plugin does not listen to live gateway events like `guildUpdate` or `channelUpdate`, so data reflects the moment of the last sync rather than real-time Discord state. Scheduled syncs register a `discordSync` task and an `autoRun` entry on a `discord-sync` queue, and you control seeding and frequency through the `schedule` config.
Package info
- Package name
@lizardglobal/payload-discord-sync- Latest version
0.1.7- Unpacked size
- 181 kB
- License
- MIT
- Weekly downloads
- 2
- Last publish
- Jul 27, 2026
More from LizardGlobalGH
View profileRich Text Lexical React Native
Renders serialized Lexical rich text from Payload CMS in React Native apps using native primitives with overridable converters.
Collection References
Automatically cascades deletes or unlinks relationship and upload fields across Payload collections when a referenced document is removed.
Dry Run
Test Payload create operations end-to-end without persisting, by rolling back the transaction after hooks and validation run.
Similar plugins
More in AdminReservation and Booking Manager
Manage reservations and bookings through Payload CMS with conflict detection and scheduling.
Audit
Automatic, compliance-ready audit logging plugin for Payload CMS that records an immutable change trail across every collection.
SEO Analyzer
Payload plugin that audits page SEO in the editor sidebar with 50+ checks, a dashboard, score history, redirects and IndexNow.
Admin Nav
Customizable Payload admin sidebar with drag-and-drop reordering, per-user preferences, 70+ icons, nested sub-menus, and a visual customizer view.
Block Builder
Visual drag-and-drop block builder that stores Payload block schemas in the database so editors design and publish blocks without code changes.
Admin Theme
A shadcn-styled admin theme for Payload whose accent, radius, font, logo and navigation are configured live from the admin panel.