Skip to content

For developers

Discord bot

Connect your Discord server to your workspace: give scripts by role, give roles by script, ask people to join before they add a free script, and announce new versions.

The Latch bot is part of Pro and above. Nothing runs on your side: the bot runs on Latch's servers and applies your rules by checking your server every few minutes.

Connect your server

  1. 1In your workspace, open Manage › Discord and press Add Latch to Discord.
  2. 2Pick your server on Discord and approve. You need Manage Server there to add the bot.
  3. 3In Discord, open Server Settings › Roles and drag the Latch role above the roles you want it to give. The bot can only give roles below its own.
  4. 4Add an invite link that doesn't expire. Your studio page's Discord card and the Join button of the join requirement use it.

A server can be connected to one workspace. Rules only apply to members who linked their Discord account to Latch (Settings › Connections).

Role rules

  • Role gives access: members with the role get a script or bundle; when the role is removed, access this rule gave is removed too. For Patreon, Ko-fi or beta tester roles.
  • Access gives role: everyone who has a script, a bundle or any of your scripts gets the role you pick, and loses it when access ends. For example, a Customer role for everyone.
  • The bot only takes back access and roles it gave. It doesn't touch access or roles you gave by hand.

Join requirement

Turn on Require joining your Discord in a free script's Explore tab, and people have to link their Discord to Latch and join your server before they can add it. Latch checks membership with Discord at the moment they add it.

  • If someone leaves the server, their access is paused that night. It comes back on its own within minutes of rejoining.
  • Paused access shows as Paused in the Access list. Revoking it ends the pause for good, even if they come back.
  • People who added the script before you turned this on, access you gave by hand and access from bundles aren't affected.

Release posts

Turn on Post new versions and pick a channel, and release notes are posted there when a version is ready. You can mention a role and limit posts to some scripts. Send a test post to check the channel.

Commands

  • /latch link: link your Discord to your Latch account.
  • /latch scripts: the studio's scripts on Explore.
  • /latch claim: add a free script to your library without leaving Discord.
  • /latch library: which of this studio's scripts you have.
  • /latch whois: a member's account ID and which of your scripts they have. Only people with Manage Server can use it.

Replies to commands are only visible to the person who used them.