Epic 4 - Sponsorships, Tech Debt, and Infra
This proposal is to fund continued work on the BrightId Unique Bot. Specifically, this funding will go to further development of the sponsorships feature, web UI, and bot infrastructure.
Completed work since last proposal
Most of my time was spent handling tech debt and improving discord bot features
Tech Debt
-
Typesafe Read and Write to Github Gist
The bot stores its data in a public github gist. Previously the functions used to update the gist was written in JS and was prone to error if called incorrectly. I rewrote the function in rescript and moved it into the utils package. This will help future devs avoid breaking the database. -
Delete guild entry from DB when bot is kicked
The gist database used by the bot was being filled with legacy servers that don’t use the brightid bot. This caused errors when listing guilds, as the data needed could not be retrieved because the bot did not have access to the guild listed. It would also cause weird bugs if the bot was re-invited to the server. -
Add roleId field in DB
Previously the bot would use the name of the role to identify the correct role. This is prone to error as Discord allows for multiple roles with the same name. If the bot is re-invited, it would create a new role with the same name and potentially use the wrong role as an identifier. It also made it difficult to rename the role, requiring a/role
command to update the name. -
Refactor rescript bindings
Reused rescript bindings have now been moved to a/bindings
folder. This cleans up the code as well as makes the bindings more reusable around the codebase. -
Refactor Commands
Refactored the bot commands to be more readable and use the refactored bindings. This makes the code more readable and also allows for more expandable functionality (i.e. better error logs) -
rescript-discordjs release
The rescript discordjs bindings have now been standardized and moved into its own npm package
Improving discord bot features
-
Better error logs
Previously, the pot only had a single response when a user failed to verify themselves. Now the bot will tell the user exactly what they need to do to move forward (e.g. Get Sponsored, Join Meets, Get Verified, Link App, etc.) -
Remove
/role
command
The/role
command is no longer needed. Now server admins can change the role name the normal way through the discord settings. -
Catch users that don’t scan the QR code
The bot will now send a follow up message if the user tries to move forward without scanning the QR code. -
Auto Verify on guild member add
The bot will now give users theVerified
role if they have already been verified by the bot in anothe server.
Work moving forward (see Epic 4 for more detail)
Sponsorships
With the added utilities in the gist DB, I can now move forward with the sponsorships feature.
Infrastructure
-
Moving the bot from Heroku to Railway
-
Release the web UI on Vercel w/ auto deployments and PR deployments
-
Host web UI on https://eth.limo
Bot Upgrades
- When the bot joins a server, give all verified users the
Verified
role
Web UI
-
Run sponsorship admin flow through web UI
-
Point https://bot.brightid.org to web UI
-
Show cool discord server stats, like verified users, sponsored users, etc
Funding
-
1046 BRIGHT / hr
(about $50/hr with a BRIGHT price of $0.0478) -
235,350 BRIGHT
Priced in working 5 hours a day for 45 days -
Recipient Address:
0xf4bb53efcfd49fe036fdcc8f46d981203ae3bab8