comBot is a custom Discord bot designed for the B Side NFT community by Hardcodepunk (Frieder Jan Moerman) on Berachain. It provides wallet-based verification for NFT holders, assigns roles based on ownership of the collection, and includes security and UX features inspired by the Booga Beras Discord bot. Instead of an Opensea bio flow, opted for signing a message with wallet on a frontend.
-
Wallet Verification via Message Signing
Users verify by signing a message with their wallet (e.g. MetaMask or Rabby..) and submitting the signature directly in Discord via a modal. -
ERC-721 NFT Ownership Check
Verifies ownership of the official B Side collection:
0xfb497d7491ac6ec07a3f102d2c37f456b067bbe1(Berachain Mainnet).Kingdomly — MagicEden — Opensea
Founded by FedPed and 0x_moonlight (Hardcodepunk, Frieder Jan Moerman.. )
-
Automatic Role Assignment
Grants Discord roles based on NFT ownership status. -
Session Management & Rate Limiting
Prevents abuse with command cooldowns and auto-clears previous verification sessions when a new one starts. -
Security First
- Only cryptographic signature verification
- Wallet address is recovered directly from the signature
- Signature data is never stored in full
- Node.js & Javascript
- Discord.js
- ethers.js for signature recovery and on-chain data
- Berachain Mainnet RPC
- Vercel for signer frontend
- Railway for deploying
- User types
/verifyin a Discord server where comBot is installed. - Bot sends a button linking to the signer page.
- User signs the provided message with connected wallet.
- Bot opens a Discord modal to collect the signature.
- Bot recovers the wallet address and checks NFT ownership.
- If verified, the user is assigned the appropriate role!
- Appoints roles based on amount of NFTs owned with appropriate message.
npm installCreate a .env file:
DISCORD_TOKEN=your_bot_token
DISCORD_CLIENT_ID=your_client_id
NFT_CONTRACT_ADDRESS=0xfb497d7491ac6ec07a3f102d2c37f456b067bbe1
RPC_URL=https://rpc.berachain.example.com
ROLE_ID=your_verified_role_id
GUILD_ID=your_discord_server_idnode index.js- Wallet signature verification via MetaMask/Rabby
- Role assignment based on ERC-721 holdings
- Modal input for signature submission
- Session clearing and rate limiting
- Cron job to check if user still holds same amount ofNFTs and if not, remove role.
- Multi-collection support
- Sales tracker
- Notifications for role revocation
- Inspired by UX of Booga Beras Bot
- Built for the B Side NFT project & community
- Powered by Berachain
Free to use, fork, and improve with credit.