Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(message.content.startsWith(prefix + "credit")) {
- if(args[0] !== `${prefix}credit` && args[0] !== `${prefix}credits`) return;
- if(args[2]) {
- if(isNaN(args[2])) return message.channel.send(`**~~>~~ :interrobang: | ${message.author.username}, type the credit you need to transfer__~~!~~__**`);
- if(mention.bot) return message.channel.send(`**~~>~~ :heavy_multiplication_x:| ${message.content.split(' ')[1]} لم يتم العثور على**`);
- if(mention.id === message.author.id) return message.channel.send('**~~>~~ :heavy_multiplication_x:| لا يمكنك تحويل كردت لنفسك**');
- if(credits[author].credits < balance) return message.channel.send(`**~~>~~ :thinking: | ${message.author.username}, Your balance is not enough for that__~~!~~__**`);
- if(args[2].startsWith("-")) return message.channel.send(`**~~>~~ :interrobang: | ${message.author.username}, type the credit you need to transfer__~~!~~__**`);
- if(args[2].startsWith(".")) return message.channel.send(`**~~>~~ :interrobang: | ${message.author.username}, type the credit you need to transfer__~~!~~__**`);
- if(args[2].startsWith("0")) return message.channel.send(`**~~>~~ :interrobang: | ${message.author.username}, type the credit you need to transfer__~~!~~__**`);
- var one = Math.floor(Math.random() * 9) + 1;
- var two = Math.floor(Math.random() * 9) + 1;
- var three = Math.floor(Math.random() * 9) + 1;
- var four = Math.floor(Math.random() * 9) + 1;
- var number = `${one}${two}${three}${four}`;
- message.channel.send(`**${message.author.username}, Amount :\`$${balance}\`
- ~~>~~ :pencil2: | \`${number}\`, أكتب الرقم للأستمرار
- **`).then(m => {
- message.channel.awaitMessages(m => m.author.id === message.author.id, {max: 1, time: 20000}).then(c => {
- if(c.first().content === number) {
- m.delete();
- message.channel.send(`**~~>~~ :moneybag: | ${message.author.username}, has transferred \`$${balance}\` to ${mention}**`);
- var mentioned = message.mentions.users.first() || message.guild.members.get(args[0]);
- mentioned.send(`:atm: | Transfer Receipt
- \`\`\`You have received $ ${balance} from user ${message.author.username} (ID: ${message.author.id})\`\`\``);
- credits[author].credits += (-balance);
- credits[mention.id].credits += (+balance);
- fs.writeFile(path, JSON.stringify(credits, null, 5), function(err) {if(err) console.log(err)});
- } else if(c.first().content !== number) {
- m.delete();
- }
- });
- });
- }
- if(!args[2]) {
- if(mention.bot) return message.channel.send(`**~~>~~ :heavy_multiplication_x: | ${message.content.split(' ')[1]} لم يتم العثور على**`);
- message.channel.send(`**~~>~~ ${mention.username}, your :credit_card: balance is \`\`$${credits[mention.id].credits}\`\`.**`);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement