GithubHelp home page GithubHelp logo

probot-tax-calculator's Introduction

probot-tax-calculator

NPM version NPM downloads

En : A simple package that calculates the tax of the pro-bot (Discord)

**Ar **: بكج بسيط يقوم بحساب ضريبة البرو بوت

المميزات

  • يقوم البكج بإعطاءك النتائج النهائية لعملية الحساب
  • يدعم البكج تغيير قيمة ضريبة الوسيط
  • تكون نتائج عملية الحساب على شكل object

For Developers :

const ptax =require('probot-tax-calculator')
//البكج يرجع object 
Exapmle : ptax.tax("1000")
{ 
"protax": 50,//ضريبة البوت
"wasitTax": 25,//ضريبة الوسيط
"tax": 75,//مجموع الضرائب (ضريبة البوت + الوسيط)
"all": 1075//المبلغ اللازم تحويله
}
//النسبة المئوية الافتراضية لضريبة الوسيط هي 2.5

//يمكنك تغيير قيمة الضريبة الخاصة بالوسيط
Exapmle : ptax.tax("1000",5)//هنا 5 تعني 5 بالمئة من المبلغ 1000 
{ 
"protax": 50,//ضريبة البوت
"wasitTax": 50,//ضريبة الوسيط
"tax": 100,//مجموع الضرائب (ضريبة البوت + الوسيط)
"all": 1100//المبلغ اللازم تحويله
}

Note : "يقبل البكج انواع المتغيرات التالية"

Integer : ptax.tax(1000)

String :ptax.tax("1000")

Float :ptax.tax(1000.0002)//Math.round 

//البكج يقوم تلقائيا بالتدوير إلى اقرب عدد ان كان الناتج عدد عشري اي :

//12.2 => 12

//12.5 => 13

//55.1 => 55

For copypasters :

const Discord = require('discord.js');
const client = new Discord.Client();

const ptax =require('probot-tax-calculator');

client.on("message",message=>{
  if(message.content.startsWith("!tax")){
    let amount=message.content.split(" ").slice(1).join(" ");
    if(!amount) {return message.channel.send("**يرجى ادخال عدد**")}
    let tax=ptax.tax(amount);
    var taxembed=new Discord.MessageEmbed()
    .setTitle("Tax Calculator")
    .addField("**ضريبة البرو بوت**",`**${tax.protax}**`)
    .addField("**ضريبة الوسيط**",`**${tax.wasitTax}**`)
    .addField("**مجموع الضرائب**",`**${tax.tax}**`)
    .addField("**المبلغ اللازم تحويله**",`**${tax.all}**`)
    .setFooter("**This package was made by Abderrahmane**")
    message.channel.send(taxembed);
    
  }});
client.on("message",message=>{
  if(message.content.startsWith("!wasitTax")){
    let amount=message.content.split(" ").slice(1,2).join(" ");
    let wasit=message.content.split(" ").slice(2).join(" ");
    if(!amount) {return message.channel.send("**يرجى ادخال عدد**")}
    let tax=ptax.tax(amount,wasit);
    var taxembed=new Discord.MessageEmbed()
    .setTitle("Tax Calculator")
    .addField("**ضريبة البرو بوت**",`**${tax.protax}**`)
    .addField("**ضريبة الوسيط**",`**${tax.wasitTax}**`)
    .addField("**مجموع الضرائب**",`**${tax.tax}**`)
    .addField("**المبلغ اللازم تحويله**",`**${tax.all}**`)
    .setFooter("**This package was made by Abderrahmane**")
    message.channel.send(taxembed);
    
  }});

client.login("Token")

tax

wasit

Links :

GitHub

Dm

Avatar

probot-tax-calculator's People

Contributors

abdo30004 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.