Docs / Sources

Discord

Import Discord members, join times and channel activity through a bot.

Matches onNames, handles, avatars
HistoryPublic channels and threads
Also does15-minute polling, opt-in
You'll needPermission to manage the server, or your own bot

Discord records

A Discord bot reads server members, join times and message activity. It cannot read email addresses or linked accounts. Thus, Discord accounts do not link automatically to accounts from other sources. Datum scores names, handles and avatars. Matches that are not certain go to your review queue.

Connect Discord

Use these steps when your Datum instance offers its own bot.

  1. Open Sources → Connect a source → Discord.
  2. Press Connect.
  3. Sign in to Discord as a person who can manage the server.
  4. Choose the server.
  5. Approve View Channels and Read Message History.
  6. Press Verify.

You do not register an application, paste a token or enter a server ID. Datum gets the server ID from the confirmed installation in Discord. Message Content Intent stays off. If Discord returns message content, Datum discards it.

A successful verification lists the server and the channels that the bot can read. To import, press Run now. To sync automatically, turn on Sync automatically every 15 minutes under Settings → Collection on the source.

Read message activity is on at the start. If you turn it off, Datum collects members, joins and the metadata of active public threads, but no messages.

Use your own bot

If the instance does not offer a bot, use the bot-token setup below. If the instance offers a bot but you prefer your own bot, use the terminal example for a customer bot later on this page. You can also use the equivalent REST or MCP call.

  1. Create a bot

    1. Open the Discord Developer Portal.
    2. Create an application with a bot.
    3. Turn on Server Members Intent in the settings of the bot.
    4. Leave Message Content Intent off.

    Datum does not need message content and does not ask for it.

  2. Add it to your server

    1. Install the bot in your server with the View Channels and Read Message History permissions.
    2. Copy the bot token.
  3. Find your server ID

    1. Turn on Developer Mode in your Discord settings.
    2. Right-click your server.
    3. Copy its ID.
  4. Open Sources

    Open Sources → Connect a source → Discord. Enter Server ID. Enter Bot token.

    Read message activity, under Advanced settings with Enable recurring sync, starts on. Disable it to collect members, joins and active public thread metadata without messages.

  5. Verify

    Press Verify.

    A successful result reads Discord bot and Server Members Intent verified. It lists the server and its text channels.

  6. Start the first sync

    The first sync reads all members. Then it reads the history of eligible public text and announcement channels, and of active and publicly archived threads. Datum reads forum and media posts through their threads. Recurring sync is off at the start. When you turn it on, Datum starts the first sync automatically. Then it checks for new messages every 15 minutes.

    1. Open the source’s Settings tab.
    2. Select Sync automatically every 15 minutes.
    3. Press Save and verify.

    For a manual sync, press Run now on the source page. You can also run ocmgr ingest <connectionId> from your terminal or agent.

    Health on Sources shows Ingesting during the sync. It shows Healthy when the sync finishes.

Data Datum imports

Members Username, display name, avatar and profile link, for people only. Datum excludes bots
Activity Joins, public channel messages, active and publicly archived threads, including forum and media posts
Not collected Message text, email addresses, linked accounts, voice activity, direct messages, private threads, and restricted or NSFW channels

Datum records the author, location and time of each message. It discards message content even when Discord supplies it. Each message retains its reaction count when first imported, without identifying who reacted. Replies retain their shared conversation reference. Repeating a sync does not duplicate existing activity.

From your terminal or agent

With the instance app, open the consent link returned by Connect before verifying:

ocmgr connection create --kind discord --json
ocmgr connection connect <connectionId> --json
ocmgr connection verify <connectionId> --json
ocmgr ingest <connectionId> --json
ocmgr connection update <connectionId> --config '{"enabled":true}' --json   # poll every 15 minutes

For a customer bot, store {"token":"your-bot-token"} in a protected discord.json file. Then create the connection with the server ID:

ocmgr connection create --kind discord --config '{"app":"customer","guildId":"123456789012345678"}' --secret-file discord.json --json
ocmgr connection verify <connectionId> --json

Over REST, send POST /v1/connections with the same kind, config and credentials. For instance consent, send POST /v1/connections/{id}/connect. To check access, send POST /v1/connections/{id}/verify. A customer bot does not use the connect step.

Set up the instance bot as an operator

  1. Create an application in the Developer Portal.
  2. Add a bot to the application.
  3. Turn on Public Bot.
  4. Turn on Server Members Intent.
  5. Leave Message Content Intent off.
  6. Register ${OCMGR_PUBLIC_URL}/connect/discord/callback on the OAuth2 page of the application.
  7. Set the three variables in the table. Also set an OCMGR_AUTH_SECRET of at least 32 characters.
Variable Value from Discord
OCMGR_DISCORD_APP_ID Numeric application ID
OCMGR_DISCORD_APP_CLIENT_SECRET OAuth2 client secret
OCMGR_DISCORD_APP_BOT_TOKEN Bot token
  1. Restart the service.
  2. Run ocmgr doctor --json.

The shared bot token stays in the protected environment of the instance. Workspace storage holds only a grant for that connection and server. Datum checks the grant before each connector operation.

An unverified bot cannot join more than 100 servers. Above that number, Discord must verify the bot and approve Server Members Intent. All servers share the global budget of 50 requests each second. Datum paces connections together within each process. It also obeys the global retry delays from Discord.

Troubleshooting

Verify fails on member access

Discord refuses access to the member list when Server Members Intent is off. For the instance bot, ask the Datum operator to turn it on. For your own bot, turn on Server Members Intent for the bot in the Developer Portal. Then press Verify again.

The bot was removed, or the server is already connected

If Datum cannot get access to the server, it marks the connection needs_reauth and releases its claim on the server. Press Connect to add the bot again. Each server can supply one live instance connection. Datum refuses a second connection, and it does not tell you which workspace has the first one.

You cannot delete a connection. To release the claim on a server, remove the bot in Discord. Then verify the existing connection. Datum keeps the imported history.

A channel is missing

Datum reads only channels where everyone can see the channel and read its history. If a role or a member is denied access to a channel, Datum does not read that channel, even if the bot can. Datum does not read private threads or NSFW channels. Datum reports the channels that it cannot read, and skips them. If a channel is eligible but missing, check the View Channels and Read Message History permissions of the bot.

FAQ

Will the bot post anything?

No. Datum reads only members, channels and message metadata.

Does polling pick up edits and deletions?

No. Each poll reads new messages and refreshes members and accessible public threads, including public archives. Datum does not track message edits, deletions or changes to older reactions. Imported history remains unchanged.

Does Discord send live webhooks to Datum?

No. This connector reads Discord through its bot API. Enable automatic sync for updates every 15 minutes, or use Run now.

Can I move the connection to another server?

No. Each connection belongs to one server. Create a new connection for another server.