Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require("discord.js");
- module.exports = class economy {
- constructor() {
- this.name = 'eco',
- this.alias = ['Eco', 'economy', 'Economy'],
- this.usage = 'eco';
- }
- run(bot, message, args) {
- if(args[1] === 'admin')
- let embed = new Discord.RichEmbed()
- .setAuthor('ADMIN COMMANDS')
- .setDescription(">eco set <mention user> <integer> | Sets the mentioned user's cash\n \n>eco reset <mention user> | Resets the mentioned user's cash\n \n>eco (take|remove) <mention user> <integer> | Takes away a specified amount of cash from the mentioned user\n \n>eco (add|give) <mention user> <integer> | Gives a specified amount of cash to the mentioned user")
- .setFooter('Economy');
- message.channel.send(embed)
- message.delete();
- if(args[1] === 'set')
- let target = message.mentioned.members.first()
- let amount = args[3]
- let target,cash = amount
- message.reply('successfully changed ${target}'s cash to ${amount}');
- if(args[1] === 'add', 'give')
- let target = message.mentioned.members.first()
- let amount = args[3]
- let target,cash = target,cash + amount
- message.reply('successfully added $${amount} to ${target}'s cash');
- if(args[1] === 'take', 'remove')
- let target = message.mentioned.members.first()
- let amount = args[3]
- let target,cash = target,cash - amount
- message.reply('successfully took $${amount} from ${target}'s cash');
- if(args[1] === 'reset')
- let target = message.mentioned.members.first()
- let amount = args[3]
- let target,cash = 0
- message.reply('successfully reset ${target}'s cash');
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement