Skip to content

stake-house/goerli-eth-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goerli ETH Bot

Configuration

Discord Setup

Create bot application

  1. Head over to https://discord.com/developers/applications/

  2. Create a new application

image

  1. Give your Bot a name

image

  1. Get your bot's token and add it to your .env file (details below)

mspaint_2021-07-09_09-35-59

  1. Add bot to your server

mspaint_2021-07-09_09-39-43

  1. Authorize the bot and it will appear in your server!

image source

Run the bot backend

  1. Clone this repo

  2. cp .env.example .env and fill out the required variables, including the token from above

  3. Implement any custom checks you want your bot to run in the receiverIsEligible function in src/goerliBot.js

  • If you implement custom checks, make sure to pass in true when calling bot.commands.get('goerliBot').execute(message, args, 1, true);
  • The bot is currently configured to send 1 goerli eth, and if the address already has 1 it will not send
  1. Add discord user id's to the maintainers command if you would like to

  2. Run the bot with the following commands

  • yarn install
  • yarn start > logfile.txt

Testing

  • yarn install
  • take a look at the "Test Zone" at the bottom of src/goerliBot.js and write the appropriate function calls for the tests you want to run
    • you can bypass the actual bot here and test the underlying functions
  • node src/goerliBot.js

Contributions

This started off as the EthStaker goerli bot, and we wanted to make it available for anyone to use. Please let us know if you have any issues or suggestions for how to make things clearer. PRs are always welcome too :)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published