aboutsummaryrefslogtreecommitdiff
path: root/plugins/economy.js
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/economy.js')
-rw-r--r--plugins/economy.js40
1 files changed, 0 insertions, 40 deletions
diff --git a/plugins/economy.js b/plugins/economy.js
deleted file mode 100644
index 3658ce8..0000000
--- a/plugins/economy.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/** **************************************
- *
- * Economy: Plugin for PokeBot that enables economy features.
- * Copyright (C) 2018 TheEdge, jtsshieh, Alee
- *
- * Licensed under the Open Software License version 3.0
- *
- * *************************************/
-
-const db = require('quick.db');
-exports.get = async (userid) => {
- const amount = await db.fetch(`money_${userid}`);
- if (amount) {
- return amount;
- }
- else {
- await db.set(`money_${userid}`, 0);
- return await db.fetch(`money_${userid}`);
- }
-};
-
-exports.add = async (userid, money) => {
- const amount = await db.fetch(`money_${userid}`);
- if (amount) {
- await db.set(`money_${userid}`, amount + money);
- }
- else {
- await db.set(`money_${userid}`, money);
- }
-};
-
-exports.subtract = async (userid, money) => {
- const amount = await db.fetch(`money_${userid}`);
- if (amount) {
- await db.set(`money_${userid}`, amount - money);
- }
- else {
- await db.set(`money_${userid}`, 0 - money);
- }
-};