Skip to content

DAO proposal bot with on-chain verification and weighted token voting.

License

Notifications You must be signed in to change notification settings

0xCozart/Discord-Proposal-Bot

Repository files navigation

Discord Proposal Bot

This bot is used to create and manage proposals that guild members can vote on.

Votes are weighted by the balance of the account registered by the user. The more ERC-20/ERC-721 tokens the user has, the more weight they have.

Admin tools are available to manage the proposals and users registered to vote.

Features

  • Create proposals
  • Vote on proposals
  • Manage accounts registered by users

Configuration

Edit sample.config.json to config.json. All following configs are required.

  1. "token" - Bot token can be found via discord in applications bot tab.
  2. "clientId" - Application ID for bot account can be found via discord.
  3. "guildId" - Server ID that the bot will run on.
  4. "permissionedRolesIds" - Ids of roles with voting privalges, should include admin roles if they also plan to vote. (Must be array type)
  5. "adminRoleIds" - (Must be a array type)
  6. "channelId" - Channel ID the bot will post proposals too.
  7. "proposalChannelId" - Channel ID of the channel where the bot will post proposals.
  8. "imageUrl" - URL of the image that will be used for the proposals UI.
  9. "infuraUrl"
  10. "contractAddress"

Installation & Usage

install (only need to once) - node commands/deploy-commands.js
start - node index.js

Commands

All commands are slash commands. For example: /command.

Commands permissioned for voting roles:

  • /register
    • input address - Registers address for retrieving token balance.

Admin commands:

  • /proposals

    • input title - Title used for proposal.
    • input description - Description of proposal.
    • input reactions - Reactions used for proposal, given in order that will be displayed. (seperated by commas, no spaces after commas)
  • /unregister

    • input address - Unregisters address to user.
    • input user - Unregisters userID.
  • /get-address-by-user

    • input user - Retrieves the address registered to user.
  • /get-user-by-address

    • input address - Retrieves the userID registered to address.

Disclaimer

Whitout signature verification, this bot relys on the good faith of the community to register their actual accounts. Address checks are in place so that one address can only be registered once. Admins are given the /unregister command to remove accounts from voting if users are acting in bad faith and/or are abusing the bot.

About

DAO proposal bot with on-chain verification and weighted token voting.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published