diff options
| author | Unknown <jtsshieh@outlook.com> | 2018-05-04 21:14:13 -0400 |
|---|---|---|
| committer | Unknown <jtsshieh@outlook.com> | 2018-05-04 21:14:13 -0400 |
| commit | f28f1440b97196e99e69fdd47783a8322af89961 (patch) | |
| tree | 53304ec6f1004388ad7932541ca449f3dfab340f /plugins/economy.js | |
| parent | 6e0b29df62902aa047015a00898915149e8ceda2 (diff) | |
| parent | 6e83ca97c115682d7afb2438a4dfd9c26c54bcde (diff) | |
| download | PokeBot-f28f1440b97196e99e69fdd47783a8322af89961.tar.gz PokeBot-f28f1440b97196e99e69fdd47783a8322af89961.tar.bz2 PokeBot-f28f1440b97196e99e69fdd47783a8322af89961.zip | |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'plugins/economy.js')
| -rw-r--r-- | plugins/economy.js | 40 |
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); - } -}; |
