Sproutly-Bot

A cozy plant-care Discord bot built with discord.js v14. Grow plants, care for them, earn coins, buy seeds, and build your greenhouse - all inside Discord.

Setup

1. Install dependencies

npm install

2. Create a .env file

DISCORD_TOKEN=your_bot_token_here

3. Start the bot

npm start

4. Development mode (auto-reload)

npm run dev

5. Run tests

npm test

The tests use temporary data files and do not modify the live data/plants.json file.

Discord setup

Invite the bot with these OAuth2 scopes:

Grant only these bot permissions:

The bot uses the Guilds Gateway Intent and does not require Message Content Intent or other privileged intents. Weather changes and freezing alerts are sent to the server system channel when available, or another text channel where the bot can send messages.

Railway deployment

Create a Railway service from this repository. Railway will use the existing npm start script (node index.js); this bot is a worker and does not need an HTTP port.

Add this Railway variable:

DISCORD_TOKEN=your_bot_token_here

Slash commands do not require the privileged Message Content Intent. Global slash commands can take time to appear in Discord. For instant updates in a test server, also add its server ID as DISCORD_GUILD_ID:

DISCORD_GUILD_ID=your_discord_server_id

The current test server ID is 1538194623179259914.

The bot stores game data in data/plants.json locally and keeps a recovery copy in data/plants.json.bak after successful saves. These live data files are intentionally ignored by Git so player accounts are not committed or exposed. Railway’s local filesystem is temporary, so add a Railway Volume mounted at /data and set PLANT_DATA_PATH=/data/plants.json if plant and account progress must survive redeploys or restarts. Without a volume, the bot still runs but local game data can be lost when the service is recreated.

Policies

Sproutly-Bot follows Discord’s requirements for verified applications.

Current Commands

All commands are Discord slash commands and must be used inside a server.

🌱 General and Progress

🌿 Plant Creation & Care

💧 Care Actions

Hydration decreases by 20 points every 24 hours without watering. Health is calculated from hydration, care, item effects, and species or weather bonuses, capped between 0 and 100.

Tampere weather is refreshed automatically every hour for each server. /weather can still be used to refresh it immediately.

Weather maps to: Sunny, Rainy, Cloudy, Windy, Thunderstorm, Foggy, Snowy, Rainbow Weather, Aurora Weather, Meteor Shower, Solar Flare, Frost Night

Snowy weather causes ❄️ Freezing and -8 health per hour unless protected by /heatlamp.

🌼 Shop & Economy

Shop items are seasonal where indicated. Use /info to view the current catalog and effects.

Plant Growth System

Growth Stages

Plants advance one stage every 30 minutes:

  1. Seed - 10 coins
  2. Sprout - 20 coins
  3. Seedling - 35 coins
  4. Young Plant - 55 coins
  5. Mature Plant - 75 coins
  6. Rare Bloom - 100 coins

Rarity Bonuses

Care Bonuses

Available Species

fern, cactus, orchid, rose, tulip, lavender, pine, sunflower, bamboo, bonsai, moonflower

Command Development

Commands live in the commands folder. Each command module exports:

module.exports = {
  name: "hello",
  description: "Replies with hello.",
  async execute(message, args) {
    await message.reply("Hello!");
  }
};

About

Sproutly-Bot is a plant-care game designed for Discord communities. Users grow plants, earn coins, buy seeds, and interact with live Tampere weather.