Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //start of coins
- if(!coins[message.author.id]){
- coins[message.author.id] = {
- coins: 0
- };
- }
- let coinsAmt = Math.floor(Math.random() * 1) + 1;
- let baseAmt = Math.floor(Math.random() * 1) + 1;
- console.log(`${coinAmt} ; ${baseAmt}`);
- if(coinAmt === baseAmt){
- coins[message.author.id] = {
- coins: coins[message.author.id].coins + coinAmt
- };
- fs.writeFile("./coins.json", JSON.stringify(coins), (err) => {
- if (err) console.log(err);
- });
- }
- //end of coins
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement