diff options
| author | TheEdgeNK <32907415+TheEdgeNK@users.noreply.github.com> | 2018-03-11 22:52:18 -0400 |
|---|---|---|
| committer | TheEdgeNK <32907415+TheEdgeNK@users.noreply.github.com> | 2018-03-11 22:52:18 -0400 |
| commit | 85d4ce8a62d5b7068b7c99890a1945b6a961ff08 (patch) | |
| tree | 020c2cbd1dd3ab12fb3b328890e22c8b8fcf1387 /commands/Owners Only | |
| parent | a462090b26b6978bb0d6259d01f3b86952abfc3a (diff) | |
| download | PokeBot-85d4ce8a62d5b7068b7c99890a1945b6a961ff08.tar.gz PokeBot-85d4ce8a62d5b7068b7c99890a1945b6a961ff08.tar.bz2 PokeBot-85d4ce8a62d5b7068b7c99890a1945b6a961ff08.zip | |
fixes for the misses
Diffstat (limited to 'commands/Owners Only')
| -rw-r--r-- | commands/Owners Only/modifycredits.js | 6 | ||||
| -rw-r--r-- | commands/Owners Only/testingcredits.js | 46 |
2 files changed, 50 insertions, 2 deletions
diff --git a/commands/Owners Only/modifycredits.js b/commands/Owners Only/modifycredits.js index 41798bb..eb56478 100644 --- a/commands/Owners Only/modifycredits.js +++ b/commands/Owners Only/modifycredits.js @@ -28,9 +28,11 @@ exports.run = async (bot, msg, args) => { user = msg.mentions.members.first(); }; - bot.plugins.economy.add(user.id, args[0]); + var oldbal = bot.plugins.economy.get(user.id) - msg.channel.send(`Modified ${user.tag}'s credits by ` + args[0] + `.`); + bot.plugins.economy.subtract(user.id, oldbal); + + msg.channel.send(`Reset ${user.tag}'s credits.`); }; exports.conf = { diff --git a/commands/Owners Only/testingcredits.js b/commands/Owners Only/testingcredits.js new file mode 100644 index 0000000..16bc83d --- /dev/null +++ b/commands/Owners Only/testingcredits.js @@ -0,0 +1,46 @@ +/** ************************************** + * + * Testing Credits: Plugin for PokeBot that modifies economy features. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * *************************************/ + +exports.run = async (bot, msg, args) => { + if (!['242775871059001344', '247221105515823104', '236279900728721409'].includes(msg.author.id)) return msg.reply('Nope! You need the person who created this bot to use this command.'); + + let user; + if (!msg.mentions.members.first()) { + user = msg.author; + } else { + user = msg.mentions.members.first(); + }; + + bot.plugins.economy.add(user.id, 50); + + msg.channel.send('Added 50 credits'); + }; + + exports.conf = { + aliases: [], + guildOnly: true, + }; + + exports.help = { + name: 'modifycredits', + description: 'Modifies the credits of a user', + usage: '@user <credits>', + }; +
\ No newline at end of file |
