Giter Club home page Giter Club logo

discord-faucet-bot's Introduction

Discord Bot Faucet

This is a Discord Bot that dispenses Testnet ETH written in TypeScript.

CodeSample1

CodeSample2

Setup

Change the example.config.json into config.json, and fill in the required fields.

Create a file called .env and paste in the following lines. Make sure to fill it out with your details

WALLET_PRIVATE_KEY="<wallet-private-key>"
BOT_TOKEN="<bot-token>"
DB_USERNAME="<username>"
DB_PASSWORD="<password>"

Installation

  1. If you do not have pnpm, run npm i -g pnpm.

  2. Install Dependancies using pnpm install.

Optionally you can update the dependancies using pnpm update.

  1. Fill in the config and run the bot : pnpm start:dev

Networks

These are the supported Networks and Tokens as of yet. Feel free to do PRs to add any other testnet networks or tokens!

Network List

  • Goerli
  • Mumbai
  • Celo

Token List

  • LINK

Adding Networks or Tokens

Adding Networks or Tokens are fairly straighforward.

  1. Open up the config.json.
  2. Add a network Object in the networks field ex :
    {
     "name": "networkName",
     "nativeCurrency": "kool",
     "ALCHEMY_URL": "https://rpc-url/xxx",
     "scan": "https://myscan.kool.io/tx/"
    }
  3. That's literally it!
  4. Make sure to do a PR into the Main Repo! (Edit the example.config.json)

Database

This BOT currently has two modes it can run, KeyV - Memory and Postgres - Storage. You can change the mode by changing the database value in the stats field of config.json like so :

Storage Mode

"database": "pg",

This sets the BOT to use storage - Postgres DB. Make sure you setup the necessary database parameters

Memory Mode

"database": "keyv",

This sets the BOT to use memory - KeyV. Use this if you want to just use the BOT without having to configure Databases. In addition, this is the default if no parameter was set into database.

Adding Features

  1. Fork the project
  2. Create a new branch - (Call it feature/)
  3. Commit the changes
  4. Yeet the changes using a PR into this!

TODO Features

  • Get the Bot Working
  • Convert to TypeScript
  • Migrate to Postgres DB
  • Beautify the code more
  • Add Support for Sepolia
  • Feature - Only Transferring if the user's account has low ETH

Inspired by

discord-faucet-bot's People

Contributors

yanukadeneth99 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.