Hats Protocol Docs
hatsprotocol.xyzGithub
  • ๐Ÿ‘‹Welcome to Hats Protocol
  • ๐ŸงขGetting Started with Hats
  • โญQuick Start
  • Using The Hats App
    • ๐Ÿค Essentials For Hat Wearers
    • ๐ŸŽฉCreating My First Hat
    • ๐Ÿง™Admins: Creating, Issuing, and Revising Hats
    • ๐Ÿ‘ฅWhat Hats Do I Need?
    • ๐ŸŒณDrafting, Exporting, and Deploying Tree Changes
    • ๐Ÿ—๏ธSetting a Hat's Basic Properties
    • ๐ŸฅณAdding Wearers
    • ๐Ÿ”Connecting Hats w/ Permissions & Authorities
      • Types of Hat-Powered Authorities
      • Connecting Hats to Token Gates
        • Hats Protocol Contract Addresses
        • Finding a Hat's Token ID
      • Documenting Hat Powers & Responsibilities
    • ๐ŸŒŸRevocation & Eligibility: Requirements for Wearers
    • โšกDeactivating & Reactivating Hats
    • โœ…Making Hats Claimable
    • ๐Ÿ”—Linking Trees Together
    • โ›“๏ธHats Protocol Supported Chains
    • โ“Glossary & FAQ
  • Hats Integrations
    • ๐Ÿ”Permissions & Authorities
      • Coordinape
      • Council Voting Vault
      • Charmverse
      • Discord
        • Collab.Land --> Discord
        • Guild.xyz --> Discord
      • Farcaster Casting Rights
      • Fileverse
      • Google Workspace
      • Hats Account
      • Role-Based Compensation
      • Safe Multisig Signing Authority
      • Telegram
        • Collab.Land --> Telegram
        • Guild.xyz --> Telegram
      • Snapshot: Voting, Weight & Proposal Creation
      • Wonderverse
    • ๐ŸŒŸEligibility & Accountability Criteria
      • Agreement Eligibility
      • Allow-List Eligibility
      • CoLinks Eligibility
      • ERC20 Eligibility
      • ERC721 Eligibility
      • ERC1155 Eligibility
      • Hat-Wearing Eligibility
      • Hats Election Eligibility
      • JokeRace Eligibility
      • Pass-Through (Hat-Based) Eligibility
      • Staking Eligibility
      • Subscription or Membership Fee (Unlock Protocol)
      • Gitcoin Passport Eligibility
    • โšกActivation & Deactivation Criteria
      • Seasonal/ Time-Expiry Toggle
      • Pass-Through (Hat-Based) Toggle
    • ๐Ÿ‘ทHatter Modules
      • Multi Claims Hatter
      • DAOhaus Moloch v3 Membership & Share Allocation
  • For Developers
    • ๐Ÿ‘ทHats Protocol, for Developers
      • Hat Properties
      • Wearing a Hat
      • Hat Admins & Hatter Contracts
      • Hats Trees
      • Hat IDs
      • Linking Hats Trees
      • Eligibility Modules
      • Toggle Modules
      • Hat Mutability and Editing
      • Creating Hats
      • Minting Hats
      • Transfering Hats
      • Renouncing Hats
      • Batch Actions
      • Hat Image URIs
      • ERC1155 Compatibility
      • โ›“๏ธSupported Chains
    • ๐Ÿค–v1 Protocol Spec
      • Hats.sol
      • HatsEvents.sol
      • HatsErrors.sol
      • HatsIdUtilities.sol
      • Interfaces
        • IHats.sol
        • IHatsIdUtilities.sol
        • IHatsEligibility.sol
        • IHatsToggle.sol
    • ๐Ÿ–ฅ๏ธv1 SDK
      • Core
        • Getting Started
        • Onchain Reads
        • Onchain Writes
        • Multicall
        • Claiming Hats
        • Utilities
      • Subgraph
        • Getting Started
        • Fetching Hats
        • Fetching Wearers
        • Fetching Trees
        • Misc
        • Types
      • Hat Details
        • Getting Started
        • Usage
    • ๐Ÿ”ญv1 Subgraphs
    • ๐ŸงฉHats Modules
      • ๐Ÿ”ŒModules SDK
        • Getting Started
        • Get Available Modules
        • Create New Instance/s
        • Composing Modules
        • Interact With Instances
        • Utilities
        • Types
      • โš’๏ธBuilding Hats Modules
        • Inside a Hats Module
          • Immutable Arguments
          • Module Setup
          • Versioning
        • Creating New Modules
        • How Module Instances Are Deployed
        • Modules Registry
        • About Module Chains
    • ๐Ÿ”Hats Signer Gate v2
    • ๐Ÿ‘’Hats Signer Gate SDK
      • Getting Started
      • Creating New Instances
      • Hats Signer Gate
      • Multi Hats Signer Gate
      • HSG & MHSG Handlers
    • ๐Ÿ’ผHats Account SDK
      • 1 of N Hats Account
        • Getting Started
        • Creating New Instances
        • Executing From An Instance
        • Constants
        • Types
    • ๐ŸŒHats Security Audits
  • Legal
    • Terms
      • Terms of Service
      • Acceptable Use
      • Privacy Policy
      • Cookie Policy
      • Attribution
Powered by GitBook
On this page
  • Giving Hats Access to Specific Discord Roles and Channels with Guild.xyz
  • Link your Hats tree to Guild to automatically display Guild authorities
  1. Hats Integrations
  2. Permissions & Authorities
  3. Discord

Guild.xyz --> Discord

How to Hat-gate Discord roles using Guild.xyz

PreviousCollab.Land --> DiscordNextFarcaster Casting Rights

Last updated 1 year ago

Giving Hats Access to Specific Discord Roles and Channels with Guild.xyz

Following is a detailed description for how to use Guild.xyz to Hat-gate Discord roles and channels

1. Connect your Discord server to Guild

If you're new to Guild, .

If you already have a Guild set up, find your Guild, select "Add reward", and choose "Discord".

Then, in your Discord server settings, add the Guild.xyz bot as an integration by navigating to the "Integrations" page under the "Apps" section. This will create a #verify channel in your Discord server where people can verify with Guild to gain access to the Discord roles associated with their Hat.

2.Create a new role in Guild:

If you already have a Guild role associated with this Hat, you can skip this step.

Navigate to your Guild and select "Add Role". We recommend creating a Guild role with the same name and image as the Hat you want to associated it with.

3. Add a requirement that an address must hold a specific Hat token ID in order to claim that Guild role:

If you have already associated that Guild role with the Hat token ID, you can skip this step.

Within that Guild role, select "Add Requirement"

Then select "NFT"

Finally, select "Add requirement".

This Guild role is now gated by the hat!

4. Give that Guild role access to the Discord role you want to be associated with the hat:

Within the Guild role, select "Add Reward", select "Add reward" within the Discord box, and connect the Guild role to a new Discord role or an already existing Discord role.

Save the Guild role. The hat now provides access to the designated Discord role via Guild!

5. Give that Discord role access to specific permissions and channels within Discord

Open Discord and select the server associated with this role.

From here, there are two means of setting the Discord authorities associated with this role.

First, open the Server Settings, and select Roles. From here you can manage the display, permissions, and other details of the Discord role associated with this hat.

Second, select the specific Discord channels you want this role to have access to. Make sure these channels are set to "Private".

Then, within each private channel you want to give this role access to, select "Add members or roles" and select the role associated with the hat.

That's it, you're done! All hat wearers have to do to claim the Discord authorities associated with their hat is to visit the #verify channel in your Discord server.

Link your Hats tree to Guild to automatically display Guild authorities

This step will enable the Hats app to automatically detect and display Guild.xyz related authorities in your Hats tree:

Skip this step if your tree's top-hat already includes the relevant Guild(s).

  • Select "Edit Tree"

  • Locate and select the tree's top-hat

  • In the "Hat Basics" section, add the relevant Guilds. A Guild's name can be found in its URL. For example, if the Guild page is https://guild.xyz/hats-protocol, then its name is 'hats-protocol'.

Guild.xyz authorities will now be displayed on the relevant hats:

Next, input the chain your hat is on, add the Hats Protocol contract address, and enter the custom token ID associated with the hat. See for details on how to find the Hats Protocol contract address and specific hat token IDs.

๐Ÿ”
follow steps 1-5 found here
Hats Protocol Contract Addresses and Token IDs