A Discord Bot for assigning your own server roles to users who link their wallets and verify their NFT ownership.
·
Report Bug
·
Request Feature
- Wallet Linking: Users can link their wallets to their Discord accounts securely.
- NFT Ownership: Verifies the ownership of NFTs in linked wallets.
- Discord Role: Automatically assigns your server's roles based on the verified NFT ownership.
- Changes of Ownership: When an NFT is acquired or transferred from/to the linked wallet, the wallet owner's roles in the server will be updated automatically.
- Fork this repo
- Make sure you have at hand the required variables before starting. Check Required Variables
- You will need an AWS account to start. Head over to Amazon Web Services and create a free account if you don't have one already.
- Create a public S3 bucket in your AWS account and upload to it your bot images.
- Make sure you have
Developer Modeenabled for you in your server. How to enable developer mode - Create a dedicated verification channel.
The channel shouldn't allow sending messages/threads/files,reactions,etc. as the bot will always communicate with the server members via private threads or DMs and any interaction single users make in the channel will make the bot's main message unreachable.
Set@everyonepermissions in this channel toXand allow only "View Channel".
TIP:You can keep the channel private while you test your bot, and open it once you are happy with your setup.
- The role you will be giving to users that link their wallets with their discord accounts. It can be an existing role or a new one.
- The roles you want to assign to NFT holders, depending on the NFT series. It can be a single role or a collection of roles. NOTE: The Bot will assign the roles that correlates to all owned NFTs series. Roles are accumulative.
You need to provide your own images for the following parts of the bot:
- Verification Channel Embed
- Verification Page Background and Logo
- Sequence Modal
- Send Messages
- Delete Threads
- Create Threads
- GUILD_MEMBERS
- GENERAL PERMISSIONS -> Manage Roles
- GENERAL PERMISSIONS -> Read Messages/View Channels
- TEXT PERMISSIONS -> All minus Emojis/Stickers
- VOICE PERMISSIONS -> None
NOTE: Make sure the bot role (server) is higher on the roles hierarchy than the roles the users interacting with the bot in your server, to allow the bot to assign roles to these users:

For the bot to work correctly, you will need to provide the following variables in an .env file Check Discord guides for detailed information on how to obtain some of them and use the example files included in this repo as template:
example_local_env_vars.json (root)
.example-env (wallet_verify_bot & wallet_verify_front-end projects)
APP_CLIENT_ID= ID of the app created in the Discord Developer portal - https://discord.com/developers/applications, select the bot, copy APPLICATION IDBOT_TOKEN= Token used by the bot to respond to actions - https://discord.com/developers/applications/{APP_CLIENT_ID}/bot (obtainable only on "Reset Token")WEBHOOK_ID= used by the lambdas to send messages in Discord threadsWEBHOOK_TOKEN= used by the lambdas to send messages in Discord threads Make sure you assign an understandable name to your webhook (i.e.: "Wallet Verification Bot") and select the verification channel in the CHANNEL drop-down
GUILD_ID= ID of your Discord server. Right-click on the Discord server name in the app, then select "Copy Server ID" - Needs developer mode enabled in the serverVERIFICATION_CHANNEL_ID= Used by the bot to interact on the verification channel - Right-click on the channel the bot will be, "Copy Channel ID"PUBLIC_EMBED_IMAGE_URL= The splash image that will be shown in the verification channel public embed emitted by the bot on startup
WALLET_VERIFIED_ROLE_ID= The role a user that has completed their wallet verification will be assigned toNFT_ROLES: A mapping between an NFT series and a role/role name in your Discord Server
DB_TABLE_NAME= DynamoDB table nameREGION= AWS regionACCESS_KEY= Used by the bot and front end to access the bot's database and to publish to SNS - Linked to user in AWSSECRET_ACCESS_KEY= Used by the bot to access the db when checking the wallet and to publish to SNS - Linked to user in awsWALLET_VERIFIED_TOPIC_ARN= Topic ARN used by the front end to publish messagesNEXT_PUBLIC_BUCKET_NAME= the S3 bucket where you host images (front end/bot/etc.)
BLUE_COLOR&RED_COLOR&GREEN_COLOR&YELLOW_COLOR= A list of string hex colors used in the embeds/messages. e.g.:"#4C4C4C"NEXT_PUBLIC_INDEX_TITLE= Wallet verification page titleNEXT_PUBLIC_CONNECT_WALLET_MAIN_MESSAGE= Main text in verification pageNEXT_PUBLIC_DONE_ICON_URL= OK icon to be shown when the verification process is successfulNEXT_PUBLIC_WARN_ICON_URL= Warning icon to be shown when the verification process was not successfulNEXT_PUBLIC_LOGO_URL= Your logo, shown at the top-left of the verification pageNEXT_PUBLIC_BACKGROUND_IMAGE_URL= Background image in the verification page
NETWORK= Used by Sequence's popup to authenticate the user in the correct networkNEXT_PUBLIC_CONNECT_WALLET_SEQUENCE_APP_NAME= Your app/server nameNEXT_PUBLIC_CONNECT_WALLET_SEQUENCE_THEME= https://docs.sequence.xyz/sdk/sequence-kit/configuration#available-optionsNEXT_PUBLIC_CONNECT_WALLET_SEQUENCE_BANNER_URL= The url to the image you want as Sequence popup header
NODE_ENV= Used by local development only. NOT NEEDED for deployment!LOG_LEVELandNEXT_PUBLIC_LOG_LEVEL= Sets logger level. If not set, it defaults toinfoJWT_SECRET= Shared between the front end and the bot, to sign (bot) and check (front end) the token generated by the bot - Can be whatever you like. Keep it hard to guess!ISSUER= Your discord server or app name, used to generate the JWT tokenVERIFICATION_PAGE_URL= URL to the verification page, used by the bot to provide the verification page linkSUPPORT_EMAIL= Your support contact email used in embeds/messagesNFT_MARKETPLACE= URL where your server members can buy an NFT
- Navigate to AWS SSO Account selection page and select the account where you are deploying the bot
- Select
Command lineorprogrammatic access - Select your OS and copy Option 1 and paste it into a terminal / CMD | PS prompt window in the bot's root directory
- Ensure you have an up to date json file with all parameters - Check the file
example_parameters_dev.jsonincluded in this repo as guidance. - Execute the parameters script with the name of your json file - e.g.:
python3 .github/scripts/update_parameters.py parameters_dev.json- You can also insert the values manually in AWS Parameters store: https://{your-region}.console.aws.amazon.com/systems-manager/parameters/?region={your-region}&tab=Table
[TBD]
For more information, please refer to our Guides and Docs
- Setting up a bot
- Get your bot's Token
- Creating Webhooks
- Adding the bot to your server
- Gateway Intents
- Unlink Wallet
- URL Shortener
See the open issues for a full list of proposed features (and known issues).
Join Our Discord Server or write to our Support Email


