Become the best guild bot that ever threw rocks.
- Create a Discord App (bot) to test updates in your server.
- Visit the 'OAuth2' tab of the Discord Developer Portal and check the 'applications.commands' scope. Copy the generated URL and visit it to grant permissions to your bot.
- (optional) Request a Twitter Developer Account (with Elevated Access, then create a Twitter Developer App (make sure you change it to have both read/write permissions).
- (optional) Install Twurl and, using your Twitter Developer consumer key & secret, generate the access token & access secret.
Edit example.env
with the following environment variables:
- DISCORD_TOKEN: A discord bot token created via the app's "Bot -> Build-a-bot" menu.
- DISCORD_CLIENT_ID: A discord bot client ID created via the app's "OAuth2" menu.
- DISCORD_GUILD_ID: A discord bot guild ID found via enabling Developer Mode.
- CONSUMER_KEY - Your Twitter Developer App's Consumer Key
- CONSUMER_SECRET - Your Twitter Developer App's Consumer Secret
- ACCESS_TOKEN_KEY - The Access Token Key of the Twitter Account your bot is posting from
- ACCESS_TOKEN_SECRET - The Access Token Secret of the Twitter Account your bot is posting from
- REALMS_CONTRACT_ADDRESS - The Ethereum address for the Realms contract. For example
0x7afe30cb3e53dba6801aa0ea647a0ecea7cbe18d
is the Mainnet contract address.
yarn && yarn start
- Create new file in
/app/services/discord/commands
- Copy existing contents from another command (e.g. GA)
- Add a name to the function in the exports
- Include what you would like to return
- Add a graphql query to
/app/services/utils/graphql/index.ts
- Run locally and test on your own server
- Add subscriptions to listen to indexer and publish updates to discord.
- Add more utility functions for the Realms, Crypts, Lootverse in general
Q: "I tried running my bot but get a 'Missing Access 50001' error"
A: This means that your application doesn't have permission for the discord server in question.
First, make sure you've granted the bot the applications.commands
OAuth2 scope Docs and visited the URL under the 'OAuth2' tab in the Discord developer dashboard for your bot.
Second, double check that your DISCORD_GUILD_ID
is set for the correct channel.