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.
- Create proposals
- Vote on proposals
- Manage accounts registered by users
Edit sample.config.json
to config.json
.
All following configs are required.
- "token" - Bot token can be found via discord in applications bot tab.
- "clientId" - Application ID for bot account can be found via discord.
- "guildId" - Server ID that the bot will run on.
- "permissionedRolesIds" - Ids of roles with voting privalges, should include admin roles if they also plan to vote. (Must be array type)
- "adminRoleIds" - (Must be a array type)
- "channelId" - Channel ID the bot will post proposals too.
- "proposalChannelId" - Channel ID of the channel where the bot will post proposals.
- "imageUrl" - URL of the image that will be used for the proposals UI.
- "infuraUrl"
- "contractAddress"
install (only need to once) - node commands/deploy-commands.js
start - node index.js
All commands are slash commands. For example: /command
.
Commands permissioned for voting roles:
/register
- input
address
- Registers address for retrieving token balance.
- input
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)
- input
-
/unregister
- input
address
- Unregisters address to user. - input
user
- Unregisters userID.
- input
-
/get-address-by-user
- input
user
- Retrieves the address registered to user.
- input
-
/get-user-by-address
- input
address
- Retrieves the userID registered to address.
- input
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.