6.0.0 โข Published 7 months ago
nova-coins-tranfser v6.0.0
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.