This project aims to gate a Discord server/channels with Superfluid streams. Exclusive channel content and perks can be accessed by users who are streaming super tokens to the server admin account through the Superfluid protocol. This project also includes periodic checks to ensure that all users with the streamer role are actively streaming to our server admin. If a user's stream is terminated or their flow rate is reduced, The bot will automatically remove the streamer role from their account to prevent them from accessing our exclusive channels and perks until they start streaming again.
- A Discord account
- Understanding of the Superfluid protocol and how to stream tokens
- An Ethereum wallet with some tokens to stream. You can get some test tokens from the Superfluid faucet.
- Stream a minimum of
0.5DAIx/monthto the server admin account0x7348943c8d263ea253c0541656c36b88becd77b9ongoerlitestnet. You can use the Superfluid app to do this.
-
Join the TechNow Discord Server: https://discord.gg/JEMFf5ux5M
-
Make sure you are streaming a minimum of
0.5 DAIx/monthto0x7348943c8d263ea253c0541656c36b88becd77b9ongoerliif you wanted to access exclusive stream gated channels. -
Open the
#start-herechannel on discord server. -
Type the command
/verifyin the channel. -
Our bot will send you a link to connect your wallet and sign a message.
-
After you sign the message, the bot will verify if a minimum of
0.5 DAIx/monthstream is present between your wallet address and the server admin address. -
If the stream is present, you will be assigned the
streamerrole and gain access to the exclusive channels and perks on the server. If the stream is not present, you will still be assigned thememberrole, which will allow you access to the general channels on the server.
sf-discord-demo-final.mp4
- A Discord account
- A Discord server where you have permissions to manage roles and channels and add bots.
- An Ethereum wallet with some tokens to stream. You can get some test tokens from the Superfluid faucet.
- Create a new Discord server and create the necessary channels(
#start-here,#superfluid-exclusive,#general) and roles(streamer,member).#start-herechannel should be the first channel in the server.#superfluid-exclusiveis the channel that we wanted to gate with stream. so make sure in the channelsettings>permisions, the@everyonerole does not have access to the channel. only thestreamerrole should have access to the channel. Also, Upon verifying with the wallet, regardless of whether a stream is present or not, amemberrole will be added to the user. This member role will allow them access to the general channels in the server. So make sure in#generalchannelsettings>permisions, the@everyonerole doesn't have access to the channel. only thestreamerandmemberroles should have access to the channel.
- Create a new Discord bot at Discord Developer Portal with necessary permissions and invite it to the server.
-
Replace
.env.examplewith.envand fill in the environment variables. -
Install dependencies by running
npm installin the root directory -
Sync the local schema to database by running
npx prisma db pushin the root directory -
Deploy slash commands by running
npm run commands:deployin the root directory -
Start the bot by running
npm startin the root directory -
Test the bot by typing
/verifyin the#start-herechannel. -
If the bot is working correctly, you should see the
streamerrole being assigned to users(ofcourse only if they stream required amount) upon verifying wallet and the#superfluid-exclusivechannel being unlocked.
If you encounter any issues with the bot, please do the following:
- Check that the bot has the necessary permissions in the server (Manage Roles, Manage Channels, Manage Messages)
- Check that the environment variables have been set up correctly in the .env file
- Check the logs for any error messages
- Superfluid - A revolutionary asset streaming protocol that brings subscriptions, salaries, vesting, and rewards to DAOs and crypto-native businesses worldwide.
- Discord - A free communications app that lets you share voice, video, and text chat with friends, game communities, and developers.
- Discord.js - A powerful Node.js module that allows you to interact with the Discord API very easily.
This is experimental software and subject to change over time.
This is a proof of concept and is not ready for production use. It is not audited and has not been tested for security. Use at your own risk. I do not give any warranties and will not be liable for any loss incurred through any use of this codebase.
This project is licensed under the MIT License - see the LICENSE file for details


