discord-ts-economy
v0.1.9
Published
A simple discord bot economy system using mongodb and typescript.
Downloads
10
Maintainers
Readme
Discord TS Economy
* ! ----------------------------- Lewd Labs ---------------------------------
* Thanks for checking our this package! Please read the information below...
* ? ------------------------ Discord TS Economy ---------------------------
Highlights
🍃
Power by MongoDB.🌀
Build with typescript.⚡
Caching for quick load times.🤖
Made for Discord.js first.
Installation
Version 16.6.0 or newer of Node.js is required
yarn add discord-ts-economy
npm install discord-ts-economy
pnpm add discord-ts-economy
Basic Demo
import { Economy, CurrencyHandler } from "discord-ts-economy";
const eco = new Economy();
// connect our database
eco.connect("mongodb connection string");
const currencyHandler = new CurrencyHandler();
// Fetches all the documents from our database (if the exist) and saves them to our cache.
currencyHandler.init();
// adds a value of 100 through 500 to a users wallet with a 10 percent fail chance.
currencyHandler.work("some_user_id", 100, 500, 10);
Click the image below for a video style introduction.
Built with
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.