constDiscord=require('discord.js')// npm i discord.jsconstclient=newDiscord.Client();client.on("ready",()=>{console.log("Bot is ready.");});constezeco=require('ez-eco.js')client.on('message',asyncmessage=>{if(message.content.toLowerCase().startsWith('bal')){letuser=message.mentions.users.first()||message.author;letdata=awaitezeco.wallet(message.guild.id,message.author.id,user.username);message.channel.send(data.money)}})
Transfer money to user
client.on('message',asyncmessage=>{if(message.content.toLowerCase().startsWith('pay')){letuser=message.mentions.users.first()if(!user)returnmessage.channel.send(`Mention availd user to transfer money to him?`)letamount=message.content.slice(prefix.length).trim().split(/+/);letdata=awaitezeco.pay(message.guild.id,user.id,amount[2],message.author.id)message.channel.send(data.money)}})