Skip to content

A cryptocurrency-styled bot that you can change to your liking.

License

Notifications You must be signed in to change notification settings

CantisW/discord-economy-bot

Repository files navigation

Discord Economy Bot

A cryptocurrency-styled bot that you can change to your liking for Minecraft servers (or any game/usage).

To Use

  • Clone this repository (git clone https://github.com/CantisW/discord-economy-bot)
  • Open Visual Studio Code or similar and open a terminal
  • Download PostgreSQL and set it up. Optionally, download a DB management service such as DBeaver.
  • Put your username and password into ormconfig.json.default then rename it to ormconfig.json. Everything else is already set up.
  • Type in npm i and wait for dependencies to install
  • Type in npm start

Enjoy! Make sure it is set up and you have node.js (v16.14.0 or higher).

Setup Bot

Go to the Discord Developer Portal and make a bot.

IMPORTANT

Please make sure that when inviting the bot to your server, you tick bot AND application.commands else the bot will not work.

Features

  • Fairly simple to set up system
  • Slash commands
  • Simple economy commands
  • Leaderboards and blockchain-like transaction logging
  • Localization
  • API support

Settings

All bot settings are located in src/data.

bot.json handles all bot-specific settings. Here is where you'll input your token and guild id. 'settings.json' handles the settings for your currency. Put in a name, max supply, etc.

API Setup

To use the API, run the bot using npm run api. The default port is 3000, but that can be changed in app.ts. Access the API using localhost:port. localhost can also be your own URL.

Don't forget to port forward!