Skip to content

pb-tax is a tax Calculator for discord bot named: ProBot

Notifications You must be signed in to change notification settings

AhmdoDev/pb-tax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!`)

About

pb-tax is a tax Calculator for discord bot named: ProBot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published