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
- 3
- 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 AdminOn-Page React Editor
Adds an inline visual editor UI for Payload pages, with toolbars, field editors, and element annotations for React front ends.
On-Page Editing
Adds inline on-page editing, draft preview links, and an admin button to edit Payload pages in place on a Next.js front end.
onpage for TanStack Start
Adds on-page editing and draft previews to TanStack Start sites that read content from Payload.
Live Preview
Live preview for Payload CMS in Astro and any SSR/static frontend (SvelteKit, Nuxt, Next.js, plain HTML), patching the DOM without rebuilds.
Socials
Multi-platform social publishing plugin for Payload 3 with OAuth adapters, scheduling, and audit trails for Pinterest, Instagram, Facebook, and Google Business Profile.
Dub
A Payload CMS plugin that automatically creates and manages shortlinks using Dub.