Skip to content

and slack economy bot integrated to my discord economy bot

Notifications You must be signed in to change notification settings

pkd2210/Slack-economy-bot

Repository files navigation

Slack Economy bot

Widgets

GitHub Repo stars GitHub forks GitHub issues GitHub pull requests GitHub last commit

Deployment

  1. Install Node.js 22.x

  2. Import the bot git clone https://github.com/pkd2210/Slack-economy-Bot.git

  3. Run npm ci

  4. Create a .env file with:

    SLACK_SIGING_SECRET=RE>
    
    SLACK_BOT_TOKEN=RE>
    
    APP_TOKEN=RE>
  5. Configure config.json for bot settings (embed color, log channel, daily payout, etc) or use the /config command.

  6. Start the bot with node index.js

Config Options

Name Description Default Setting
default_balance The default amount of money a person gets when they enter the server 0
log_channel_id Channel ID for logging important actions (none)
command_room Channel ID where commands can be used (none)
balance_per_message Amount of money earned per message 0
messages_cooldown_secends Cooldown (in seconds) between earning money from messages 0
leaderboard_limit Number of users shown in the leaderboard (Max 25!) 10
daily_payout Amount given for daily claim 0
embed_color Hex color for all embed messages (e.g., #FFFFFF) #FFFFFF
reward_room Channel ID where item purchase notifications are sent (none)
reward_giver_id Role ID to mention when an item is purchased (none)

Features

Balance Management

  • /addbalance — Add balance to a user
  • /removebalance — Remove balance from a user
  • /balance — Check your or another user's balance
  • /daily — Claim a daily payout (configurable)
  • /leaderboard — View the top users by balance
  • /buyitem - Purchase an item from the shop
  • Earn money by sending messages (with cooldown)

Item & Shop Managementment

  • /createitem — Create a new shop item (supports code-based or stock-based items)
  • /edititem — Edit item details (name, description, price, stock)
  • /removeitem — Remove an item and its codes from the shop
  • /addstock — Add a code to an item's stock (for code-based items)
  • /shop — View all items in the shop

Data Storage

  • Uses SQLite for persistent storage of users and items
  • Each item can have its own codes table for unique code stock

Logging

  • All important actions (balance changes, item changes, config updates) are logged to a configurable channel // discord only

File Structure

  • index.js — Main bot logic and event handling
  • scommands/ — All slash command implementations
  • config.json — Bot configuration
  • users.db — User balances and daily tracking
  • items.db — Shop items and item codes

AI Usage

I used GitHub Copilot for code completions, wording, some SQLite queries, and bug understanding (not direct bug fixing, but understand the bugs).

About

and slack economy bot integrated to my discord economy bot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published