UNPKG

ludex.eco

Version:

ludex.eco Javascript İle Yapılabilecek Kolay Kurulumlu Bir Ekonomi Modülüdür.

87 lines (76 loc) 2.35 kB
const discord = require("discord.js") const client = new discord.Client() const ecoeasy = require("./../server.js") const Economy = new ecoeasy() client.on("ready", () => { console.log("Ready") }) client.on("message" , async message => { if(message.content.startsWith("!balance")){ let bal = await Economy.balance({ userId: message.author.id }) message.channel.send("Your balance: " + bal.money) } if(message.content.startsWith("!work")){ let work = await Economy.work({ userId: message.author.id, workMoney: 500, workJobs: ["IDOT"] }) message.channel.send("You have worked as " + work.job + " and got " + work.amount + "$") } if(message.content.startsWith("!addmoney")){ let work = await Economy.addMoney({ userId: message.author.id, amountMoney: 69, }) message.channel.send("I have added to your balance " + work.amount + "$") } if(message.content.startsWith("!removemoney")){ let work = await Economy.removeMoney({ userId: message.author.id, amountMoney: 69, }) message.channel.send("I have removed from your balance " + work.amount + "$") } if(message.content.startsWith("!setmoney")){ let work = await Economy.setMoney({ userId: message.author.id, amountMoney: 69, }) message.channel.send("I have set your balance to " + work.amount + "$") } if(message.content.startsWith("!resetmoney")){ let work = await Economy.resetMoney({ userId: message.author.id, }) message.channel.send("I have reset your money") } if(message.content.startsWith("!pay")){ let work = await Economy.search({ userId: message.author.id, usertoPay: message.author.id, amountMoney: 69, }) message.channel.send(`You have paid yourself ${work.amount}$`) } if(message.content.startsWith("!search")){ let search = await Economy.search({ userId: message.author.id, searchMoney: 500, searchPlace: ["Place1", "Place2"] }) message.channel.send(`You have search in ${search.place} and got ${search.amount}$`) } if(message.content.startsWith("!beg")){ let work = await Economy.beg({ userId: message.author.id, begMoney: 500, begPeople: ["Person1", "Person2"] }) message.channel.send(`${work.people}: Here take ${work.amount}$`) //-> Person1: Here take 200$ } }) client.login("")