Advertisement
Fradix

Points probot

Jan 30th, 2020
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         .setAuthor('Points:')
  2. 255
  3.         .setColor('#FBFBFB')
  4. 256
  5.         .setFooter('Requested by' + message.author.username, message.author.avatarURL)
  6. 257
  7.         message.channel.send(add);
  8. 258
  9.       }else if(args[2].startsWith('-')) {
  10. 259
  11.         args[2] = args[2].slice(1);
  12. 260
  13.         args[2] = parseInt(Math.floor(args[2]));
  14. 261
  15.         if(points[userM.user.id].points == 0) return message.channel.send(error);
  16. 262
  17.         if(!args[2]) return message.channel.send(error);
  18. 263
  19.         if(isNaN(args[2])) return message.channel.send(error);
  20. 264
  21.         if(args[2] > 1000000) return message.channel.send(error);
  22. 265
  23.         if(args[2] < 1) return message.channel.send(error);
  24. 266
  25.         if((points[userM.user.id].points - args[2]) < 0) args[2] = points[userM.user.id].points;
  26. 267
  27.         points[userM.user.id].points -= args[2];
  28. 268
  29.           let rem = new Discord.RichEmbed()
  30. 269
  31.         .setDescription(`**:small_blue_diamond:** <@${userM.id}> \`${points[userM.user.id].points}\``)
  32. 270
  33.         .setAuthor('Points:')
  34. 271
  35.         .setColor('#FBFBFB')
  36. 272
  37.         .setFooter('Requested by' + message.author.username, message.author.avatarURL)
  38. 273
  39.         message.channel.send(rem);
  40. 274
  41.       }else if(!args[2].startsWith('+') || !args[2].startsWith('-')) {
  42. 275
  43.         args[2] = parseInt(Math.floor(args[2]));
  44. 276
  45.         if(isNaN(args[2])) return message.channel.send(error);
  46. 277
  47.         if(args[2] > 1000000) return message.channel.send(error);
  48. 278
  49.         if(args[2] < 1) return message.channel.send(error);
  50. 279
  51.         if(points[userM.user.id].points == args[2]) return message.channel.send(`${userM.user.username} points is already ${args[2]}.`);
  52. 280
  53.         points[userM.user.id].points = args[2];
  54. 281
  55.           let set = new Discord.RichEmbed()
  56. 282
  57.         .setDescription(`**:small_blue_diamond:** <@${userM.id}> \`${points[userM.user.id].points}\``)
  58. 283
  59.         .setAuthor('Points:')
  60. 284
  61.         .setColor('#FBFBFB')
  62. 285
  63.         .setFooter('Requested by' + message.author.username, message.author.avatarURL)
  64. 286
  65.         message.channel.send(set);
  66. 287
  67.       }
  68. 288
  69.       }
  70. 289
  71.       }
  72. 290
  73.  
  74. 291
  75. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement