if(args[1] === 'wallet') { const amount = parseFloat(args[2]) const target = message.mentions.members.first() || message.guild.members.cache.get(args[0]) if(!target) return message.reply(`Who would you like to give some extra credit?`) if(!args[1]) return message.reply(`Where would you want to add their extra credit? wallet or bank?`) if(!amount) return message.reply(`What amount would you like to give them?`) economy.findOneAndUpdate({ guildID: message.guild.id, userID: target.id }, {$inc: {wallet: amount}}, async (err, data) => { if(data) { data.wallet += amount data.save() message.channel.send(`$${amount.toLocaleString()} added credits to ${target} to their wallet.`) } else { return message.reply("This user still not creating account.") } }) } else if(args[1] === 'bank') { const amount = parseFloat(args[2]) const target = message.mentions.members.first() || message.guild.members.cache.get(args[0]) if(!target) return message.reply(`Who would you like to give some extra credit?`) if(!args[1]) return message.reply(`Where would you want to add their extra credit? wallet or bank?`) if(!amount) return message.reply(`What amount would you like to give them?`) economy.findOneAndUpdate({ guildID: message.guild.id, userID: target.id }, {$inc: {wallet: amount}}, async (err, data) => { if(data) { data.bank += amount data.save() message.channel.send(`$${amount.toLocaleString()} added credits to ${target} to their bank.`) } else { return message.reply("This user still not creating account.") } }) }