Modbot Docs
Discord

Account linking

Let members prove which Discord account and which VRChat account are theirs, give linked members a role, and unlink them again.

Account linking lets a member of your community prove that a Discord account and a VRChat account belong to the same person. They do it themselves, on a page Modbot serves at /link. Nobody needs a Modbot account for this.

Once linked:

  • the bot gives them a linked role in your Discord server, and an 18+ role if their VRChat account is marked 18+ verified;
  • moderators see the two accounts side by side in the person popups;
  • event channel filters that name one of the accounts also match events on the other.

Most members never link, and that is normal. Nothing else in Modbot needs a link. A person can link whether or not they are in your VRChat group, and whether or not they are in your Discord server.

This page is about your community's members. Staff connect their own Modbot account to Discord from Your account: Connect with a code and /verifyaccount, which needs only the bot, or Connect Discord, which signs in to Discord through the same application you set up here (see Setting up the bot). They connect it to VRChat when they first sign in (see Staff accounts).

Set it up

You need the Change settings permission. The bot should be set up first (Setting up the bot), and a Public address must be saved under Settings → Server.

Copy the OAuth2 client id and secret

In the Discord Developer Portal, open your bot's application, then OAuth2. Copy the Client ID, and reset and copy the Client Secret.

Paste them into Modbot

Open Settings → Discord and find the Account linking card. Paste them into Client id and Client secret, then press Save account linking.

The secret is stored encrypted and never shown again; Client secret says Stored. To keep it when you change something else, leave the secret field empty. If you change the client id without entering a new secret, the stored secret is removed, because it belongs to the old client id.

Add the redirect URL in the Developer Portal

The card now shows a Redirect address. It is your public address followed by /api/discord-link/callback. Press Copy, then in the Developer Portal open OAuth2 → Redirects, add it, and save.

If there is no Redirect address on the card, the public address is not set.

Pick the roles

  • Linked role — given to every linked member.
  • 18+ role — given to linked members whose VRChat account is marked 18+ verified. Optional, and it must be a different role from the linked role.

For the bot to give these roles, it needs the Manage Roles permission, and its own role must sit above both roles in Server Settings → Roles. A role the bot cannot give is marked Bot cannot assign in the picker, and Modbot will not save it.

Press Save account linking. Once a role is saved, the Bot invite link on the card also asks for Manage Roles. Press Open on it to give the bot that permission if it does not have it yet.

When the client id, the secret and the public address are all saved, Linking on the card says On.

Send members to your link page: your public address followed by /link. Anyone in your server can also run /link in Discord, which replies with a Link VRChat account button. If linking is not set up, /link replies "Account linking is not set up on this server."

The page is titled Link your VRChat account and has two parts, Discord and VRChat. They can be done in either order, but Check only works once the member has signed in with Discord.

  1. Sign in with Discord. Discord asks the member to let your bot's application see their username. Modbot reads only their Discord id and username. Signing in on the page lasts an hour.
  2. Name the VRChat account. They paste their VRChat profile link or user id into VRChat profile link or user id and press Get code. Open my VRChat profile opens VRChat's website so they can find it.
  3. Put the code in their VRChat bio. The page shows a short code with a Copy button. They add it anywhere in the bio of that VRChat account. Change lets them pick a different account.
  4. Press Check. Modbot reads the VRChat profile once. If the code is in the bio, the page says "Linked to" followed by the VRChat name. The member can take the code out of their bio afterwards.

When a member is linked, the page shows Linked with both names, and an Unlink button.

Limits on checking

Each check reads a VRChat profile, which counts against Modbot's VRChat request budget, so checks are limited:

  • A code lasts 30 minutes.
  • Each code can be checked 6 times. The page shows how many checks are left.
  • A member must wait 10 seconds between checks.
  • The whole site allows 30 checks a minute. Past that, members see "Too many checks right now. Try again in a minute."

Getting a new code starts the count again.

Messages a member may see

MessageMeaning
… is not in that account's bio yet.The code was not found. Check it was saved in the bio of the right account, and try again.
That VRChat account is already linked to another Discord account.Each VRChat account can be linked to one Discord account. The other link has to be ended first, by that member or by a moderator.
That code has expired.More than 30 minutes passed. Get a new code.
That code has been checked too many times.Get a new code.
Discord sign-in was cancelled. / Discord sign-in expired. Try again. / Discord sign-in failed.Signing in with Discord did not finish. Try again. If it keeps failing, see If something is wrong.
Account linking is not set up.The client id, the secret or the public address is missing.

A Discord account can be linked to only one VRChat account at a time. If a member links the same Discord account to a different VRChat account, the new link replaces the old one.

Linked roles

Modbot checks every link about once a minute, and straight away when a link is saved or ended or a member joins the server. It compares the roles each member should have with the roles Modbot gave them, and fixes the difference:

  • A new link gets the Linked role, and the 18+ role if the VRChat account is marked 18+ verified.
  • The 18+ role follows the 18+ verified mark on the VRChat account. The mark is set automatically when VRChat shows the account as 18+ verified, or by a moderator's 18+ check. If a moderator clears the mark, the role is taken away.
  • An ended link loses the roles Modbot gave.
  • If you change the Linked role or 18+ role setting, Modbot takes away the old role and gives the new one.
  • Modbot only takes away roles it gave. A role someone gave by hand in Discord is left alone.

A member who is not in your Discord server is skipped until they join. When a linked member leaves and joins again, Discord removes their roles, and Modbot gives them back when it sees them join. Seeing people join needs the Server Members Intent. Without it, the member can get their roles back by unlinking and linking again on the link page.

If Discord refuses a role change, the Discord bot card on Health shows "Could not change a linked member's role", with Discord's reason, and Modbot tries again a minute later.

Switch on Prompt new joiners to link their VRChat account and press Save account linking. The bot then sends each person who joins your server a direct message: "Welcome to" your server's name, "Link your VRChat account.", and a Link VRChat account button that opens the link page.

  • Bots and members who are already linked are not asked.
  • If the person does not accept direct messages and a Backup channel is set, the bot posts in that channel instead, mentioning only that person: "your DMs are closed. Link your VRChat account here." with the same button. Leave Backup channel empty to skip this.
  • The bot needs View Channels and Send Messages in the backup channel.
  • This needs the Server Members Intent (see Intents the bot asks for).

Each attempt is recorded as Asked to link on Discord, with how it went.

For members who were already in the server, staff can send a slow, one-time reminder from the Account links tab, and the welcome message can carry a Link your VRChat button. See Account links.

Unlinking

A member can unlink on the link page: they sign in with Discord and press Unlink.

A moderator can unlink from the person's popup, on the Discord card. The popup is the same one whichever of their accounts you opened it by. Unlink opens a confirmation naming the person and their Discord id; press Unlink again to confirm, or Cancel.

Seeing these cards needs See profiles. The Unlink button needs Manage Discord links. Of the built-in roles, only Administrator has Manage Discord links; give it to other roles on the Roles page if you want to (see Roles and permissions).

Either way, the roles Modbot gave are taken away within a minute. That includes the Discord role of a role pair that Modbot gave, while role sync is on; the group role stays. Nothing in either person's history is deleted: the record that the link existed stays, and each account keeps its own history.

The Discord card in a VRChat person's popup shows the Discord name and id, when they linked, the roles Modbot gave, Not in the server when they have left, and any problem giving a role.

What members can see: /me

/me lets any member of your Discord server see what your Modbot holds about them. It is off until you turn it on: open Settings → Discord, find the Commands card, switch on /me, and press Save commands. The bot adds the command to your server within a few seconds, and takes it away again when you switch it off. It cannot be turned on in the demo.

The reply is visible only to the member who ran it. It shows:

FieldWhat it says
VRChatThe linked VRChat name, followed by "(linked)", or Not linked.
DiscordTheir Discord username.
Member sinceWhen they joined your VRChat group, or Not in the group. Only shown when they are linked.
Roles from ModbotThe Discord roles Modbot gave them and they still hold: the linked role, the 18+ role, and roles from role sync. None when there are none. A role somebody gave by hand is never listed.
StandingBanned if they are banned from your VRChat group or your Discord server, otherwise Good. Nothing else: no reason, no rule, no case file.
Event invitesOn if they asked for event invites, otherwise Off.

A member who is not linked also gets a Link your VRChat account button, when linking is set up.

Get event invites

Under the card there is a Get event invites button, or Stop event invites once they have asked. Pressing it is the member's own choice, and the only way a member gets invites to the group's events: an event that invites a saved list invites only the people on it who asked. Modbot keeps the choice with when it was made, adds an Asked for event invites or Stopped event invites entry to the audit log, and answers "You will get invites to the group's events." or "You will not get invites to the group's events." Stopping takes effect straight away, even for an event whose invites are already going out. Stop event invites works even after you switch /me off, from a reply a member already has; and while /me is off, no member's earlier "Get event invites" counts.

/me never shows anybody else, who they were in an instance with, who reported them, anything a moderator wrote, flags or evidence. It reads only what Modbot has stored and asks VRChat nothing.

Each member can use /me and its buttons 5 times a minute. Each time a member runs it, a Discord command used entry is added to the audit log.

What Modbot keeps

The What Modbot keeps button shows everyone the same list, titled What Modbot can keep. It is the most a Modbot can keep, depending on what the group has switched on, and follows the privacy policy item for item:

From VRChat

  • Your display name, and the names, bios and status messages you had before
  • Your VRChat id, bio, status, status message and pronouns
  • Links to your profile picture, icon, banner and avatar picture
  • When you joined VRChat, your account tags and the platform you were last on
  • Whether VRChat says you are age-verified, and whether a moderator marked you 18+ by hand
  • The group you show on your profile: its id, name and icon
  • VRChat's full answer about your profile, minus where you are, private notes and your friend key

About the group

  • That you are a member, when you joined, your roles, and whether you left
  • Notes moderators keep on your membership in VRChat
  • Bans and unbans, when they happened and who did them
  • Whether you asked for event invites, and when you changed it
  • Each event invite Modbot sent you, and whether it got through
  • Whether you are a friend of the group's Modbot VRChat account, as far as Modbot has learned

Where you have been

  • Which of the group's instances you joined and left, and when
  • When you changed avatar, and the avatar's name
  • Which instance you were in when something happened, and who else was there
  • Instance kicks and warnings from VRChat's group log, with where they happened
  • If you moderate with the companion and turned it on: when you saved a clip there, and its fingerprint

Moderation

  • Kicks, bans and unbans, with the reasons, the moderator's note and their Modbot username
  • Notes moderators wrote about you, with who and when, including ones taken back
  • Case files, with a copy of your profile, membership and ban entry at the time
  • Evidence on them, and who attached, took off, viewed, downloaded or destroyed each file
  • Flags from the group's word lists and AI topics: the rule, the words or picture, and where
  • The AI call log: the whole prompt and answer, up to 20,000 characters each
  • How many times you were kicked, banned, removed or turned away, and the last moderator

Discord

  • Your messages in full, who you replied to, and every edit and delete, old text kept
  • For attachments: the file's name, type, size and link, not the file
  • Your Discord id, username, display name, nickname, avatar link and roles
  • When you joined and left, whether you boost the server, and any timeout
  • If you are banned: your name, avatar link and the ban reason
  • When you joined, moved between and left voice channels, and for how long. Never the audio
  • Your account link, with both names
  • Whether you got in through the server's join gate, and when
  • Your giveaway entries, with your name and account ids
  • Each time you use /me, and any request to delete your data

If you have a Modbot account

  • Your username, email address, and linked Discord and VRChat accounts
  • Every sign-in, with the address it came from
  • Every failed sign-in, with the username typed and the address, never the password
  • What you did and the settings you changed, with your name

Ask to delete my data

The Ask to delete my data button sends a request to your staff. It deletes nothing by itself. When a member presses it:

  • a review opens on the Reviews page, titled Asked to delete their data, with their Discord name and id and their linked VRChat account;
  • an Asked to delete their data entry is added to the audit log;
  • if a Discord channel is set on the Alerts card under Settings → AI → Alerts, the bot posts one line there naming them, with an Open review button when a public address is set;
  • the member is told "Sent to the group's staff. Case files are kept."

A member can have one open request at a time; pressing again says "You have already asked. The group's staff have it." Your whole server can receive 20 requests in any 24 hours; after that members are told "Too many requests. Try again later."

To act on a request, an administrator uses Purge a person, which keeps case files and their evidence. Then close the review with a note saying what you did.

What is recorded

These events appear in the audit log and can be sent to event channels:

EventWhen
Discord account linkedA member finished linking.
Discord account unlinkedA link ended, by the member or by a moderator.
Discord role given for a linkModbot gave the linked role or the 18+ role.
Discord role taken away for a linkModbot took one of those roles away.
Asked to link on DiscordA new joiner was sent the prompt, or could not be. Also each message of the one-time reminder.
Asked to delete their dataA member pressed Ask to delete my data under /me.

If something is wrong

ProblemWhat to do
Sign in with Discord fails every timeCheck that the redirect URL in the Developer Portal matches the Redirect address on the Account linking card exactly, and that the client secret is current.
Linking says Not set upSave the client id, the client secret, and a public address.
Members link but get no roleGive the bot Manage Roles and move its role above the linked and 18+ roles. Check Health for the reason.
New joiners are not messagedCheck that Prompt new joiners to link their VRChat account is on and the Server Members Intent is switched on.

Modbot is not endorsed by or affiliated with VRChat Inc. or Discord Inc. VRChat is a trademark of VRChat Inc. Discord is a trademark of Discord Inc. SteamVR is a trademark of Valve Corporation. Windows is a trademark of Microsoft Corporation. Docker is a trademark of Docker, Inc. PostgreSQL is a trademark of the PostgreSQL Community Association of Canada. Railway is a trademark of Railway Corp. Other names are trademarks of their respective owners; see Legal. Modbot and its logo are trademarks of the Modbot project. Open source under AGPL-3.0.

On this page