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.
Most of my time was spent handling tech debt and improving discord bot features
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
/rolecommand to update the name.
Refactor rescript bindings
Reused rescript bindings have now been moved to a
/bindingsfolder. This cleans up the code as well as makes the bindings more reusable around the codebase.
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)
The rescript discordjs bindings have now been standardized and moved into its own npm package
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.)
/rolecommand 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 the
Verifiedrole if they have already been verified by the bot in anothe server.
Work moving forward (see Epic 4 for more detail)
With the added utilities in the gist DB, I can now move forward with the sponsorships feature.
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
- When the bot joins a server, give all verified users the
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
1046 BRIGHT / hr
(about $50/hr with a BRIGHT price of $0.0478)
Priced in working 5 hours a day for 45 days