JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q36397F
  • License ISC

A tax calculator for a discord multi-purpose bot named ProBot(https://probot.io), this project uses typescript as its main language.

Package Exports

  • pb-tax
  • pb-tax/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pb-tax) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm version npm downloads creator

🇺🇸 En :

is an easy and simple package used efficiently to calculate discord's most advanced bot: ProBot

🇸🇦 Ar :

عبارة عن بكج سهلة وبسيطة تُستخدم بكفاءة لحساب بوت الديسكورد الأكثر تقدمًا: بروبوت

Installation

Node.js 16.9.0 or newer is required.

npm install pb-tax

Example :

import pbtax from "pb-tax"

const client = new Client({
    intents: ["GUILDS", "GUILD_MESSAGES"]
})

client.once('ready', () => {
    console.log(`${client.user.tag} is ready!`)
})

client.on('messageCreate', async (message) => {
    const prefix = `+`
    if(message.content.includes(`${prefix}tax`)) {
        const args = message.content.split(" ")
        const number = parseFloat(args[1])
        const tax = pbtax(number)
        const embed = new MessageEmbed()
        .setAuthor({name: `${message.author.tag}`, iconURL: `${message.author.avatarURL()}`})
        .setTimestamp()
        .setColor("BLURPLE")
        .addFields([
            {
                name: `All:`,
                value: `${tax.all}`,
                inline: true
            },
            {
                name: `Protax:`,
                value: `${tax.protax}`,
                inline: true
            },
            {
                name: `tax`,
                value: `${tax.tax}`,
                inline: true
            },
            {
                name: `wasit`,
                value: `${tax.wasit}`,
                inline: true
            },
        ])
        message.reply({embeds: [embed]})
    }
})

client.login(`TOKEN HERE!`)```