1.3.1 • Published 2 years ago

amtix-tax v1.3.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Examples/How Package AmtiX-Tax Work?

How To Install Package?

npm install amtix-tax

Example How Package Work For Discord.js Version v12?

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

// AmtiX-Tax Package
const amtixtax = require('amtix-tax');

// Bot Prefix
const prefix = "Your Bot Prefix Here";

// Code
client.on("message", message => {
  if(message.content.startsWith(prefix + "tax")) {
    let amount = message.content.split(" ").slice(1).join(" ");
    if(!amount) return message.channel.send("Amount Cannot Be Empty")
    let taxs = amtixtax.tax(amount,true) // true will accept amount like this 1.7m or 100k
    if(!taxs)return message.channel.send("**Put A Valid Number**")
    const embed = new Discord.MessageEmbed()
    .addField("**The bot will take**",`**${taxs.difference}**`)
    .addField("**The amount you need to transfer**",`**${taxs.tax}**`)
    message.channel.send(embed);
  }});

// Client Login
client.login("your token here");

Example How Package Work For Discord.js Version v13/v14?

// Discord Package
const { Client, ActionRowBuilder, ButtonBuilder, ButtonStyle, Message, MessageEmbed } = require('discord.js');
const client = new Client({
	intents: 131071, // Intents Calculator : https://ziad87.net/intents/
	partials: ['CHANNEL'],
  });

// AmtiX-Tax Package
const amtixtax = require('amtix-tax');

// Bot Prefix
const prefix = "Your Bot Prefix Here";

// Code 
client.on("messageCreate", message => {
  if(message.content.startsWith(prefix + "tax")) {
    let amount = message.content.split(" ").slice(1).join(" ");
    if(!amount) return message.channel.send("Amount Cannot Be Empty")
    let taxs = amtixtax.tax(amount,true) // true will accept amount like this 1.7m or 100k
    if(!taxs)return message.channel.send("**Put A Valid Number**")
    var embed = new Discord.MessageEmbed()
    .setTitle("Probot Tax")
    .addField("**The bot will take**",`**${taxs.difference}**`)
    .addField("**The amount you need to transfer**",`**${taxs.tax}**`)
    message.channel.send({embeds: [embed]});
  }});

// Client Login
client.login("your token here");

Example How Package Work For Discord.js Version v13 Handler?

const { MessageEmbed, Permissions } = require("discord.js");
const amtixtax = require('amtix-tax');

module.exports = {
    name: 'tax',
    desription: 'Probot tax',
    permission: ["SEND_MESSAGES"],
    async execute(client, message, args){
    let amount = message.content.split(" ").slice(1).join(" ");
    if(!amount) return message.channel.send("Amount cannot be empty")
    let taxs = amtixtax.tax(amount,true) // true will accept amount like this 1.7m or 100k
    if(!taxs)return message.channel.send("Put a valid number")

    const taxembed = new MessageEmbed()
    .addField("- **The bot will take**",`**${taxs.difference}**`)
    .addField("- **The amount you need to transfer**",`**${taxs.tax}**`)
    .setFooter(`${client.user.username}`, `${client.user.displayAvatarURL({dynamic: true})}`)
    .setTimestamp()
   await message.reply({embeds: [taxembed]})
     }
}

By AmtiXDev

Image

If You Need Help About How The Npm Package Work? Contant Me HERE

CopyRight ©

All rights reserved to AmtiXDev

1.3.1

2 years ago

1.3.0

2 years ago

1.2.9

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago