Discord
Connect a Discord server to Ploy to see who is in it, who owns it or holds administrator rights, which roles each member holds, and to remove members or grant and revoke roles directly from Ploy. Each Ploy connection scans one Discord server; if you want Ploy to cover several servers, add a separate connection for each one.
This integration is in beta. Ploy built it from Discord's published API and has not yet run it against a live customer server, so some behaviour may differ from what is described here. The first step of setup is a consent checkbox, Beta integration acknowledgement. Ticking it lets Ploy capture technical error details from this connection when a call to Discord fails, including Discord's API responses with personal information removed, and use them only to debug and improve the integration. Nothing is shared outside Ploy.
What Ploy syncs
Every member of the connected server, including bots. Bot accounts are shown as service accounts rather than people.
Each member's access to Discord, with the date they joined the server.
The server itself, as a resource whose members are shown as Owner, Administrator (they hold a role with the Administrator permission) or Member.
Every role in the server, as a resource. Each role shows who holds it, and its description lists the powerful permissions it grants, such as Administrator, Manage Roles, Kick Members or Ban Members.
Members still completing the server's membership screening are shown as pending, but keep their access.
When someone leaves or is removed from the server, Ploy picks this up on the next scan and marks their access as revoked.
Discord does not share members' email addresses with bots, so Ploy identifies people by their Discord username and display name. Discord also does not expose two-factor status, last activity or sign-in history for other members, so those are not synced. Channels, bans and the server audit log are not synced yet.
Before you begin
You need permission to manage the Discord server you want to connect (to add a bot to it).
You need access to the Discord Developer Portal at discord.com/developers/applications to create an application and its bot.
Create a bot for Ploy
Open the Discord Developer Portal and create a new application. Give it a recognisable name such as
Ploy.Open the application's Bot page and copy the bot token. Store it somewhere safe; you will paste it into Ploy shortly. If you lose it, reset the token on the same page and use the new one.
On the same Bot page, switch on Server Members Intent. Discord requires this before a bot can list a server's members, and Ploy cannot scan without it.
Add the bot to your server from the application's OAuth2 page, using the
botscope. Scanning needs no extra permission. If you want Ploy to remove members and change roles, give the bot Kick Members and Manage Roles.In your server's role settings, drag the bot's role above every role you want Ploy to grant or revoke, and above the members you want Ploy to be able to remove. Discord never lets a bot manage a role or a member that sits at or above its own highest role.
Find your server ID
In Discord, open User Settings, then Advanced, and turn on Developer Mode.
Right-click your server's icon and choose Copy Server ID. It is a long number.
Connect Discord to Ploy
In Ploy, go to Integrations and choose Discord.
Tick Beta integration acknowledgement.
Under Enter your Discord bot token, paste the bot token.
Under Enter your Discord server ID, paste the server ID.
Test the connection. Ploy reads one member of the server to confirm the bot can see it, then completes the setup.
The first scan brings in your server's members and roles shortly afterwards.
What Ploy can change in Discord
With a bot that has the permissions above, Ploy can:
Remove a person from the server. They keep their Discord account and can rejoin if someone sends them a new invite. Removing someone who has already left counts as done.
Grant and revoke a role for a member from the role's resource page in Ploy. Roles owned by a bot or another integration are assigned by Discord and cannot be changed.
Ploy cannot add people to a Discord server: Discord only lets a person join through their own consent. Discord has no suspended or disabled state for a server member, so removing the member is the equivalent action. Ploy never bans anyone.
Troubleshooting
"Discord rejected that bot token." The token is wrong or was reset. Copy it again from the Bot page of your application, or reset it and paste the new one.
"The bot cannot list this server's members." Server Members Intent is switched off, or the bot has not been added to this server. Switch the intent on and add the bot, then test again.
"Discord could not find that server." The server ID is wrong, or the bot is not in that server. Copy the ID again and check the bot appears in the server's member list.
"That server ID is not valid." The ID must be the long number from Copy Server ID, with nothing else around it.
Removing a member or changing a role fails with a permissions message. Give the bot Kick Members and Manage Roles, and move its role above the roles and members you want Ploy to manage.
Someone left the server but still shows access in Ploy. Removals are picked up by the next scheduled scan, so allow a little time for the change to appear.