GithubHelp home page GithubHelp logo

ahnafpro / faucetbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from almostefficient/faucetbot

0.0 0.0 0.0 104 KB

Discord bot that dispenses ETH on EVM testnets

License: GNU General Public License v3.0

JavaScript 100.00%

faucetbot's Introduction

FaucetBot

This is a Discord bot that dispenses Rinkeby ETH.

Features:

  • Full control over the wallet
  • Customisable funding amount (0.1 ETH by default)
  • No concurrent requests to prevent failed transactions due to nonce issues
  • Customisable per user cooldowns (1 hour by default)
  • Balance check and donation alert

image

Requirements

  • Yarn
  • Node.js > 16.6.0

Setup

  • Register an application and get a token from here

  • Rename the scheme.config.json file to config.json

  • Add the bot token, Alchemy URL, wallet keys, and the guild/client IDs to the config.json file Note: The client ID is the application ID of the bot. You can get this from the application page or by right-clicking the bot and selecting "Copy ID". The guild ID is the ID of the server you want the bot to be in. You can get this by right-clicking the server and selecting "Copy ID".

  • Install with

yarn install
  • Run node deploy-commands.js to register your slash commands. Note: Deploy is at guild level by default. You can change this by updating the deploy-commands.js file.

Usage

  • Start the bot with
node .
# or with PM2 (recommended)
pm2 start index.js 

I highly recommend a process manager such as PM2 or forever to make sure the bot stays up.

  • Use /faucet <address> to request funds.
  • Use /ping to get balance and donation address.

Config

You can change the following in the config.json file:

  • cooldown: Wait time between requests per user. Takes a value in milliseconds. Set to 3600000 (1 hour) by default.
  • amount: how much to fund per request. Takes a string value. Set to "0.1" ETH by default.
  • maxFeePerGas: The maximum price (in wei) per unit of gas for transaction. Takes in a BigNumber. Set to 25000000000 (25 gwei) by default.
  • activityType: Discord activity for the bot. Options - PLAYING, STREAMING, LISTENING, WATCHING. Set to WATCHING by default.
  • activityName: Name of the activity. Set to "Buildspace.so" by default. This shows as "Watching Buildspace.so" in the bot's presence.
  • approvedRoles: Role IDs for roles that do not have a cooldown (i.e. no waiting 1 hour b/w requests). Takes in an array of strings.

faucetbot's People

Contributors

almostefficient avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.