A streamlined Discord bot for BeethovenX that runs automated cron jobs. This version removes all unused commands and focuses solely on the essential cron operations.
Built with modern tooling: viem for Ethereum interactions and Node.js 22+.
- Node.js >= 22.0.0
- yarn or npm
This bot runs the following automated tasks:
- claimStsRewards - Claims stS rewards every 1 hour
- autoVoteDelegate - Automated voting with delegate (runs every 15 minutes)
- scheduleDynamicEclpRangeUpdater - Updates dynamic ECLP ranges (runs every 1 hour)
- scheduleTreasuryNotifications - Monitors treasury transactions (runs every 1 hour)
- scheduleDynamicFeeUpdater - Updates dynamic swap fees (runs every 5 minutes)
- Clone the repository or navigate to this directory:
cd beets-cli-v2- Install dependencies:
yarn install
# or
npm install- Copy the environment template and configure:
cp .env.example .env- Edit
.envwith your actual values:DISCORD_TOKEN- Your Discord bot tokenRELIC_UPDATER- Private key for relic updater wallet (without 0x prefix)FEE_UPDATER- Private key for fee updater wallet (without 0x prefix)MD_DELEGATE- Private key for MD delegate wallet (without 0x prefix)SAFE_API_KEY- Your Safe API key for treasury monitoring
Start the bot with:
yarn start
# or
npm startThe bot will:
- Connect to Discord
- Initialize all enabled cron jobs
- Run continuously, executing crons on their scheduled intervals
beets-cli-v2/
├── abi/ # Contract ABIs
│ └── SonicStaking.json
├── src/
│ ├── app.ts # Main entry point
│ ├── client/
│ │ └── discord-client.ts # Discord client setup
│ ├── config/
│ │ ├── config.ts # Network and contract configurations
│ │ └── viem-client.ts # Viem client setup (Sonic network)
│ ├── crons/ # Cron job implementations
│ │ ├── claim_sts_rewards.ts
│ │ ├── vote_with_delegate.ts
│ │ ├── remind_oor_dynamic_eclps.ts
│ │ ├── notifyTreasuryTxns.ts
│ │ ├── update_swap_fees.ts
│ │ ├── latestVotes.json # State: Last voting data
│ │ └── latestNonceTreasury.json # State: Treasury nonces
│ └── interactions/
│ └── send-message.ts # Discord message utilities
├── package.json
├── tsconfig.json
├── .env.example
└── README.md
This version is a clean rewrite that:
- Removes all slash commands (unused)
- Removes disabled cron jobs
- Migrates from Hardhat + Ethers.js to Viem for modern, lightweight Ethereum interactions
- Removes unused dependencies
- Requires Node.js 22+
Only the essential cron jobs that were enabled in the original app.ts have been migrated.