Advertisement
dfhfjjfgjfsfeedgf

Untitled

Nov 3rd, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. //start of coins
  2. if(!coins[message.author.id]){
  3. coins[message.author.id] = {
  4. coins: 0
  5. };
  6. }
  7.  
  8. let coinsAmt = Math.floor(Math.random() * 1) + 1;
  9. let baseAmt = Math.floor(Math.random() * 1) + 1;
  10. console.log(`${coinAmt} ; ${baseAmt}`);
  11.  
  12. if(coinAmt === baseAmt){
  13. coins[message.author.id] = {
  14. coins: coins[message.author.id].coins + coinAmt
  15. };
  16. fs.writeFile("./coins.json", JSON.stringify(coins), (err) => {
  17. if (err) console.log(err);
  18. });
  19. }
  20.  
  21.  
  22.  
  23. //end of coins
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement