Skip to content

AstarNetwork/astar-faucet-bot

Folders and files

NameName
Last commit message
Last commit date
Dec 5, 2023
Aug 9, 2022
Dec 5, 2023
Sep 27, 2021
Mar 31, 2022
Sep 22, 2021
Aug 9, 2022
Sep 22, 2021
Jul 18, 2024
Nov 9, 2021
Sep 22, 2021
May 30, 2022
Aug 9, 2022
Sep 22, 2021
Sep 22, 2021
Jul 22, 2024
Sep 22, 2021
Jul 22, 2024

Repository files navigation

Discord Bot Starter Project

Usage

Configuration

To start the bot server, you must provide the application credentials environmental variables. You can do this by creating a .env file with the following variables.

# Bot user app token
DISCORD_APP_TOKEN=<bot token>

# Bot user client ID
DISCORD_APP_CLIENT_ID=<app id>

# Server ID for the bot to be installed
DISCORD_GUILD_ID=<guild id>

# The channel ID for the bot to listen to
DISCORD_FAUCET_CHANNEL_ID=<channel id>

# Secret phrase (mnemonic) for the faucet account
FAUCET_SECRET_PHRASE=<secret phrase>

# Secret key for RECAPTCHA
GOOGLE_RECAPTCHA_SECRET = <secret key>

# Private key for the EVM faucet account
EVM_FAUCET_PRIVATE_KEY=<private key>

# Faucet send amount
TESTNET_FAUCET_AMOUNT = '15'
SHIDEN_FAUCET_AMOUNT = '0.002'
ASTAR_FAUCET_AMOUNT = '0.002'

# Redis URL in URL format
# In Heroku, this is automatically set when you add the Redis add-on to your app.
REDIS_URL=<redis://[:password@]host[:port][/db-number][?option=value]>

# Discord webhooks
# Ref: https://www.labnol.org/code/20563-post-message-to-discord-webhooks
DISCORD_WEBHOOK_URL = 'https://discord.com/api/webhooks/XXXXX/XXXXXXX'
# Discord: Server settings > Roles > … > Copy ID
DISCORD_MENTION_ID = '@&123456789'

Scripts

# install all the dependencies
yarn

# starts the server app in node.js environment
yarn start
# or you can use `yarn serve`

# starts a development server with ts-node
yarn dev

# transpile the project for production
yarn build