BrightID Discord Bot - Epic 4 (continued)

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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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)

  6. rescript-discordjs release
    The rescript discordjs bindings have now been standardized and moved into its own npm package

Improving discord bot features

  1. 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.)

  2. 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.

  3. 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.

  4. Auto Verify on guild member add
    The bot will now give users the Verified 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

  1. Moving the bot from Heroku to Railway

  2. Release the web UI on Vercel w/ auto deployments and PR deployments

  3. Host web UI on https://eth.limo

Bot Upgrades

  1. When the bot joins a server, give all verified users the Verified role

Web UI

  1. Run sponsorship admin flow through web UI

  2. Point https://bot.brightid.org to web UI

  3. 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

1 Like

Based on our experience, it will take 7 times longer to pass a proposal of this size than if you break it into two proposals each with half of the amount.

100k BRIGHT is the sweet spot for getting proposals passed quickly.

You can link both of the proposals to this same forum post. Just label the first (1/2) and the second (2/2).

You can read the discord post where we crunched the numbers here.

1 Like

Cool! Remade the proposals