zerohash

Posted on May 28, 2022Read on Mirror.xyz

PeopleDAO Collab.Land Bot Tutorial

Author(s): zerohash | Tet#7609

Editor(s): koala | koala#4988

Last updated: 28th May 2022


What is the Collab.Land bot?

Collab.Land is a Discord and Telegram bot that is used for community-management via a token-gated system. The bot verifies the user’s ownership of any digital assets and provide them exclusive channel and role access if they own the particular asset.

The Collab.Land bot works in toggle mode where it is capable of automatically give/take channel and role privilege:

  • The bot give verified user the role and channel access if they do own the particular digital asset - this is the token-gated community management system.
  • The bot revokes these special channel and role access if the user sells, transfers, or loses their digital assets from the wallet in any way.
  • Verified members are also able to tip each other using the bot within the community - in the form of their verified digital asset.

What advantage does the bot bring towards community-management?

Automation is king in today’s working environment. The same applies to all the decentralized autonomous organizations (DAOs) and communities across the web3 ecosystem that are scaling at an incredible rate. To manually verify the ownership authenticity of every user is an impossibility and thus, Collab.Land bot is the automated solution that every community needs.

The bot allows community managers to utilize the open-access on-chain data of digital assets in assigning channel and role access within Discord and Telegram. This dissolves the need for manual labour of assigning channel and role privilege. As such, the bot enables community to scale efficiently via an automated verification system which is highly customizable by each community manager.

What happens under the hood?

The bot requires users to link their Discord account to their wallet. Using user-signed messages that are fee-less in nature, it verifies that the user owns the particular wallet they are connecting. Once a user has been verified, the bot checks the connected wallet for pre-specified digital assets, pre-specified by the community manager, to assign the user their role and channel privilege. If no pre-specified digital asset is found in the connected wallet, privilege will not be assigned to the user.

Users will only have to connect their wallet once for each server. Once this verification is complete, the bot will assign them any future roles and channel privilege that is programmed by the community manager. As there is a constant verification process, the bot is able to revoke any assigned role and channel privilege if a user loses the digital asset from their wallet.


Discord Integration

Server setup

1. Create a discord server if you don’t have one yet. Follow this guide if you need help creating a Discord server.

2. Manually add the bot to your newly created server. You can invite the bot to your server with this link. Make sure the bot has Administrator permission.

Inviting Collab.Land bot to a private server.

3. Adding the bot automatically creates the Collab.Land role for the bot. Arrange this role so that it has the highest authority in terms of role hierarchy.

Collab.Land bot role should be the highest!

4. Create a private channel that disallows everyone to access. This private channel only allow those that are verified to access. This is the key to token-gating a community!

Set the channel private and only allow verified users to access it.

Configuring Collab.Land bot for your Discord server

1. In the #collabland-config channel, enter !setup role to begin the gateway role setup. React according with the corresponding emoji on which blockchain your token is deployed from. For the demo, we will use the $PEOPLE token from Ethereum mainnet.

React with the corresponding emoji for your blockchain of choice.

2. Next, choose the token standard of your token. This can be ERC-20, ERC-721, ERC-1155 and etc. Since we are using $PEOPLE token, it will be ERC-20 token standard.

React with the corresponding emoji for your token standard.

3. We are now going to set up the token by specifying its contract address, token amount to qualify for the role, set a maximum cap on number of tokens, as well as the role that is assigned for whoever that qualifies.

0x7A58c0Be72BE218B41C608b7Fe7C5bB630736C71 1000 -1 @Verified

So here’s a little breakdown. Using $PEOPLE token, we will have to specify its token contract address, which can be found here. Next, we specify we need people to hold a minimum of 1000 token to qualify for the role, but we do not put a maximum cap on this. Once these 3 criteria are fulfilled, they are given the @Verified role to access token-gated channels and etc.

If we are using NFT token standard such as POAP, ERC-721, or ERC-1155, there will be a fifth parameter for us to specify, which is the token ID from the NFT collection.

4. Lastly, you just need to direct users to your gateway channel to verify their assets in the #Verification channel by clicking the Let’s go button, which will open a browser pop-up for external site verification using their self-custodial wallet (ie. MetaMask, WalletConnect and etc.)

Click "Let's go" and "Connect wallet" to verify your assets and get roled!

5. Go to the browser pop-up and get verified. Make sure the website is the collab.land website.

Website is https://connect.collab.land/


Telegram Integration

Create New Telegram Group

  1. In Telegram, select the Messages icon in the upper right hand corner.

  2. Select New Group to create your new community.

  3. Add @collablandbot to your group. Search for collablandbot in the Search bar. Select the button next to the bot's name. Select Next.

  4. Add a name for your new group

  5. Optional: Add a picture for your group icon by selecting the Camera icon.

  6. Select Create.

  7. Move onto Configure Your Group Settings.

Configure Your Group Settings

You'll need to make sure your group is set up to use the Collab.Land bot by editing your Group Settings. If you have an existing Telegram group, start here.

  1. Access your group settings by selecting your group icon in the upper right hand corner of the menu bar.

  2. Select Edit.

  3. Set your group as a Super Group and allow all new group members who join to see the full message history.

  4. Select Chat History for New Members

  5. Select Visible option

  6. Select Done to save.

  7. Add @collablandbot to your group as an admin. Access group settings by repeating steps 1 - 2 above.

  8. Select Administrators.

  9. Select Add Admin.

  10. Select Collab.Land bot. The bot should have these settings enabled:

  11. Select Done to save.

    Verify your wallet and link to the group

    To leverage the Collab.Land bot, you will have to link your wallet to your group. For administrators, this is so your community can use Collab.Land features listed in the Admin Functions section. For members, this is so you can access Airdrops and Token Permissioned Chat. For best results, make sure you are on your Telegram desktop app to complete these steps and you have already downloaded and setup MetaMask.

    1. You should see the Verify with Metamask button displayed by the bot.
    2. Select Verify with Metamask button.
    3. A new window or tab will pop up in your browser to check whether you have MetaMask installed. You should then see a Confirm button to link Metamask.
    4. Select the Confirm button.
    5. When the wallet is successfully linked, an All done! message will appear in the browser window.
    6. You will also receive a message from @collablandbot verifying your wallet address.