diff options
| author | Unknown <jtsshieh@outlook.com> | 2018-03-31 21:48:49 -0400 |
|---|---|---|
| committer | Unknown <jtsshieh@outlook.com> | 2018-03-31 21:48:49 -0400 |
| commit | 7d2830b1934a9cddd0fac4e65642d259fc31e528 (patch) | |
| tree | fcd354561a2d06953e4a6bda5dfadd97372a0d2b /Plugins/economy.js | |
| parent | c14f020b6c10061f5e75774ba7aabd979d377bc3 (diff) | |
| download | PokeBot-7d2830b1934a9cddd0fac4e65642d259fc31e528.tar.gz PokeBot-7d2830b1934a9cddd0fac4e65642d259fc31e528.tar.bz2 PokeBot-7d2830b1934a9cddd0fac4e65642d259fc31e528.zip | |
test
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); - } -}; |
