Advertisement
UntitledGoose

Untitled

Feb 21st, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord = require("discord.js");
  2.  
  3. module.exports = class economy {
  4.     constructor() {
  5.         this.name = 'eco',
  6.             this.alias = ['Eco', 'economy', 'Economy'],
  7.             this.usage = 'eco';
  8.     }
  9.     run(bot, message, args) {
  10.         if(args[1] === 'admin')
  11.             let embed = new Discord.RichEmbed()
  12.                 .setAuthor('ADMIN COMMANDS')
  13.                 .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")
  14.                 .setFooter('Economy');
  15.             message.channel.send(embed)
  16.             message.delete();
  17.         if(args[1] === 'set')
  18.             let target = message.mentioned.members.first()
  19.             let amount = args[3]
  20.             let target,cash = amount
  21.             message.reply('successfully changed ${target}'s cash to ${amount}');
  22.        if(args[1] === 'add', 'give')
  23.            let target = message.mentioned.members.first()
  24.            let amount = args[3]
  25.            let target,cash = target,cash + amount
  26.            message.reply('successfully added $${amount} to ${target}'s cash');
  27.         if(args[1] === 'take', 'remove')
  28.             let target = message.mentioned.members.first()
  29.             let amount = args[3]
  30.             let target,cash = target,cash - amount
  31.             message.reply('successfully took $${amount} from ${target}'s cash');
  32.        if(args[1] === 'reset')
  33.            let target = message.mentioned.members.first()
  34.            let amount = args[3]
  35.            let target,cash = 0
  36.            message.reply('successfully reset ${target}'s cash');
  37.     }
  38. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement