This command will save the payout address to the SourceCred account corresponding to the user of the command. The payout address is saved directly to the configured instance's Ledger.
/setpayoutaddress 0xEdd000B7Db3cb8931d4E0cb1D0DBe6B947Ceb09A
You can also use these commands to enable and disable your account for receiving Grain distributions.
/activate
/deactivate
This bot should work self-hosted (.env) or on repl.it (repl secrets)
- Copy .example.env to .env
- Open Config.js
- Verify that the details added are correct for the Discord Guild (server ID) and Token (NATION)
- Currently configured to push to a test branch self-register-bot-test once tested, update and redeploy
- Create a Discord Application
- Navigate to Discord Developer Portal
- Click New Application
- Give the application a sensible name like Nation3 SourceCred Activation
- Create Bot
- Click Bot menu and add a new Bot
- Reset the Token and copy the generated value
- That token should be set in the .env file on the Production environment in the BOT_SECRET element
- Add Bot to Discord
- Open the OAuth2 menu and select the URL Generator sub-menu
- Check the applications.commands role and copy the generated URL
- Open the generated URL in the browser as a Discord user with permission to administer the Discord server
- Select correct server and add
- Copy Client ID from OAuth2 > General CLIENT ID to the .env file on the Production environment in the CLIENT_ID element
- Copy the public key to the .env file on the Production environment in the PUBLIC_KEY element
- Add a Personal Access Token with write access to the SourceCred repository to the .env file on the Production environment in the GITHUB_SECRET element
- Deploy the app somewhere with Node 16 and run
npm start
- In the Discord Developer Portal in the settings for your app set INTERACTIONS ENDPOINT URL to point at the location where this code is hosted