6.0.0 โ€ข Published 7 months ago

nova-coins-tranfser v6.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

nova-coins-tranfser

Installation

Install nova-coins-tranfser

$ npm install nova-coins-tranfser

Install discord.js

$ npm install discord.js

Features

  • Simple & easy to use ๐ŸŽ—๏ธ

  • Support Eng & Arb NovaBot language ๐Ÿ”—

  • Support discord.js version 14 ๐Ÿ”–

  • Easy setup & setting for each server โš™๏ธ

  • Edit & Get any data with simple function โ›๏ธ

  • Returns full data of transfer ๐Ÿ“ก

  • Event & Collection system ๐Ÿ”—

Note !

  • nodeJs v16 <=

Getting Started

At first install the nova-coins-tranfser package

const { Client, Intents, GatewayIntentBits, } = require("discord.js"); // npm i discord.js

const client = new Client({ 

  intents: [
    
GatewayIntentBits.Guilds, 

  GatewayIntentBits.GuildMessages,

    GatewayIntentBits.GuildMembers
   ] 

});


const { createPurchaseEmbed, isConfirmationMessage, TaX } = require("nova-coins-tranfser"); // npm i nova-coins-transfer

/// Important !


const price = 1000; // The Price

const botid = '1245727635536085032';// The Bot Id

 const bank = '1213474808050880515'; // Bank Id


// support
client.on('messageCreate', async (message) => {
   
    if (message.content.startsWith('!support')) {
        

     
        const finalPrice = TaX(price);

        // embed message
        const embed = createPurchaseEmbed(price, bank, botid { title: 'ุทู„ุจ ุฏุนู…', color: '#FF0000', description: `${finalPrice}` });

        return message.channel.send({ embeds: [embed] });
    }

    // confirm
    if (message.content.startsWith('!confirm')) {

// const finalPrice = tax(price); // if you want with tax you can use this  


        // check the message
        const isConfirmed = isConfirmationMessage(message.content, bank, price, botid);//if you want with tax add     , finalPrice 

        if (isConfirmed) {
            return message.reply('โœ…Transfer has been confirmed');
        } else {
            return message.reply('โŒ The confirmation message does not match the required format');
        }

// tax
if (message.content.startsWith('!tax')) {
    const args = message.content.split(' ');
    const price = parseInt(args[1], 10);

    const finalPrice = TaX(price); // assuming tax is a function

    if (finalPrice) {
        return message.reply(`The Tax Is ${finalPrice}`);
    } else {
        return message.reply('โŒ Error Calculating Tax');
    }
});


// for use only tax

const { Tax } = require("nova-coins-tranfser");

console.log(Tax("5000")); // number with tax.

Thanks. TkShaB7.โ„ข๏ธ

Thanks. Support.