Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .setAuthor('Points:')
- 255
- .setColor('#FBFBFB')
- 256
- .setFooter('Requested by' + message.author.username, message.author.avatarURL)
- 257
- message.channel.send(add);
- 258
- }else if(args[2].startsWith('-')) {
- 259
- args[2] = args[2].slice(1);
- 260
- args[2] = parseInt(Math.floor(args[2]));
- 261
- if(points[userM.user.id].points == 0) return message.channel.send(error);
- 262
- if(!args[2]) return message.channel.send(error);
- 263
- if(isNaN(args[2])) return message.channel.send(error);
- 264
- if(args[2] > 1000000) return message.channel.send(error);
- 265
- if(args[2] < 1) return message.channel.send(error);
- 266
- if((points[userM.user.id].points - args[2]) < 0) args[2] = points[userM.user.id].points;
- 267
- points[userM.user.id].points -= args[2];
- 268
- let rem = new Discord.RichEmbed()
- 269
- .setDescription(`**:small_blue_diamond:** <@${userM.id}> \`${points[userM.user.id].points}\``)
- 270
- .setAuthor('Points:')
- 271
- .setColor('#FBFBFB')
- 272
- .setFooter('Requested by' + message.author.username, message.author.avatarURL)
- 273
- message.channel.send(rem);
- 274
- }else if(!args[2].startsWith('+') || !args[2].startsWith('-')) {
- 275
- args[2] = parseInt(Math.floor(args[2]));
- 276
- if(isNaN(args[2])) return message.channel.send(error);
- 277
- if(args[2] > 1000000) return message.channel.send(error);
- 278
- if(args[2] < 1) return message.channel.send(error);
- 279
- if(points[userM.user.id].points == args[2]) return message.channel.send(`${userM.user.username} points is already ${args[2]}.`);
- 280
- points[userM.user.id].points = args[2];
- 281
- let set = new Discord.RichEmbed()
- 282
- .setDescription(`**:small_blue_diamond:** <@${userM.id}> \`${points[userM.user.id].points}\``)
- 283
- .setAuthor('Points:')
- 284
- .setColor('#FBFBFB')
- 285
- .setFooter('Requested by' + message.author.username, message.author.avatarURL)
- 286
- message.channel.send(set);
- 287
- }
- 288
- }
- 289
- }
- 290
- 291
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement