1.3.3 • Published 1 month ago

arab-tools v1.3.3

Weekly downloads
-
License
GPL-3.0-only
Repository
github
Last release
1 month ago

This module is protected by a license so if you're thinking of stealing it or modifying it to harm other users, think again. Any modified items can be passed down to my github by a push request.

Arab-Tools

A simple npm package that makes it easier for the user to break discord TOS.

Features

  • Autoreaction: Auto reacts on giveaways so you can win alot of them without moving a muscle
  • Auto leveling: Just spams in a specific channel so you can level up for any bot
  • Staying in voice: same thing as auto leveling but for farming vc exp
  • BroadCast: Advertises to everyone in the server using a discord bot. Very usefull for advertisment
  • MultiCast: BroadCast but with multiple bots incase one of the bots gets banned `
  • Quran: A class featuring alot of Islamic useful functions. (random azkar, random ahadith, playing the holy quran in the vc)
  • Games: WORKING ON IT!! (No ETA.)

Installation

Prerequisites

To use this library, you need to have:

  • Node.js (v16 or higher recommended)
  • A Discord bot with voice channel access

Steps

  1. Install the arab-tools npm module:
    npm i arab-tools@latest

Usage

AutoReaction SelfBOT

AutoReaction allows the selfbot to join giveaways automatically, provides the message links and win updates also includes stat system.

Features

  • Interaction buttons: Clicks on button interactions
  • Normal emoji reacts: Clicks on normal reacts
  • Stats: JSON DB with win and joins data

Installation

Prerequisites

To use this library, you need to have:

  • Node.js (v16 or higher recommended)
  • A Discord bot with voice channel access

Steps

  1. Install the arab-tools npm module:
    npm i arab-tools@latest
  1. Set up your Discord bot: Ensure that your Discord bot is configured and has permission to send messages in channels. You can find instructions on setting up a Discord bot here.

Usage

Import the User Class

In your bot’s code, import and initialize the User Class.

const arabtools = require("arab-tools");

const { Client } = require('discord.js-selfbot-v13'); // works with any library that uses discord.js-like syntax;

const client = new Client();

// Create a new class bot
const Bot = new arabtools.user(client);

Start Autoreaction

To start sending message to all your members, use the Broadcast method:

Bot.autoreaction({
    customBotID: ["bot id's that you want the account to react on"], // optional option, There is 2 default bots


    timeout: 5000, // time you want the account to delay the reaction


    blacklistedwords: ["word1", "word2"], // Some admins like to see the accounts that uses autoreaction so this is a secuirty measure, put words like "test" so the bot won't react on these giveaways


    ownerId: "your id", //kind of an optional option, but you can put your id and that id will be returned when you win a giveaway

    
});

Bot.on("giveawayCreated", (data) => {
    console.log(data)
    // output: {url: messageURL, embed: the embed of the giveaway, bot: the bot that made the giveaway, owner: the id you put in ownerId}
})

Bot.on('wins', (data) => {
    console.log(data)
    //output: {data: message(Message Object), owner: the id you put in ownerId, inv: server Invite}
})

AutoLeveling SelfBOT

it just spams in a specific TextChannel to farm exp.

Features

  • 2 Languages: You can use English or arabic.
  • Gibberish Spamming: spams random letters instead of words

Installation

Prerequisites

To use this library, you need to have:

  • Node.js (v16 or higher recommended)
  • A Discord bot with voice channel access

Steps

  1. Install the arab-tools npm module:
    npm i arab-tools@latest

Usage

Import the User Class

In your bot’s code, import and initialize the User Class.

const arabtools = require("arab-tools");

const { Client } = require('discord.js-selfbot-v13'); // works with any library that uses discord.js-like syntax;

const client = new Client();

// Create a new class bot
const Bot = new arabtools.user(client);

Start Auto Leveling

To start the auto leveling, use the leveling method.

let lang = "eng"

Bot.leveling({
    channel: "channel you want the bot to spam in",

    randomLetters: false, // if true it spams random letters

    time: 10000, // delay between each message in ms

    type: lang == 'eng' ? 'eng' : 'ar' // The language, can be "ar"
})

Bot.stopLeveling() // Stops the leveling

Bot.restartLeveling() // Restarts the leveling process with the latest options. you can change the options.

Staying in Voice SelfBOT

Sits in a voice channel.

Features

  • Sits in voice 24h: That's all it does.

Installation

Prerequisites

To use this library, you need to have:

  • Node.js (v16 or higher recommended)
  • A Discord bot with voice channel access

Steps

  1. Install the arab-tools npm module:
    npm i arab-tools@latest

Usage

Import the User Class

In your bot’s code, import and initialize the User Class.

const arabtools = require("arab-tools");

const { Client } = require('discord.js-selfbot-v13'); // works with any library that uses discord.js-like syntax;

const client = new Client();


const Bot = new arabtools.user(client);

Start VoiceStay

Bot.VoiceStay({
    guild: "The guild",
    channel: "The voice channel"
});

BroadCast Bot

Broadcast bots are like super-fast messengers that can send important messages to all your members at once, without ban

Features

  • BroadCast Function: let's send message to all your members without ban
  • Customized Broadcast: You can obtain all data such as duration, successes, failures, etc., on the broadcast status by using the Broadcast function.

Installation

Prerequisites

To use this library, you need to have:

  • Node.js (v16 or higher recommended)
  • A Discord bot with voice channel access

Steps

  1. Install the arab-tools npm module:
    npm i arab-tools@latest
  1. Set up your Discord bot: Ensure that your Discord bot is configured and has permission to send messages in channels. You can find instructions on setting up a Discord bot here.

Usage

Import the Bot Class

In your bot’s code, import and initialize the Bot Class.

const arabtools = require("arab-tools");

// Create a new Discord client
const client = new Discord.Client({intents:["Guilds", "GuildMembers", "GuildMessages","MessageContent"]});

// Create a new class bot
const Bot = new arabtools.bot(client);

Start Broadcast

To start sending message to all your members, use the Broadcast method:

// Start the Broadcast
const data = await Bot.Broadcast({
    guildID: '12345677890',
    message: "Hi, Here !",
    timeout: 2000,
    mention: true,
    logInfo: false,
});


// data will be returned after the broadcast is finished.
console.log(data);

MultiCast Bot

Multi-cast bots are like personal assistants for your online server members. Imagine having a group of bots that can send different messages to different smaller server members. These bots can divide a big group into smaller ones, making it easy to send specific messages to each smaller group. It's like having a personal newsletter for every part of your server!

Features

  • MultiCast Function: let's send message to all your members with group of bots
  • Customized MultiCast: You can obtain all data such as duration, successes, failures, etc., on the MultiCast status by using the MultiCast function.

Installation

Prerequisites

To use this library, you need to have:

  • Node.js (v16 or higher recommended)
  • A Discord bot with voice channel access

Steps

  1. Install the arab-tools npm module:
    npm i arab-tools@latest
  1. Set up your Discord bot: Ensure that your Discord bot is configured and has permission to send messages in channels. You can find instructions on setting up a Discord bot here.

Usage

Import the Bot Class

In your bot’s code, import and initialize the Bot Class.

const arabtools = require("arab-tools");

// Create a new Discord clients
const client = new Discord.Client({intents:["Guilds", "GuildMembers", "GuildMessages","MessageContent"]});

const client1 = new Discord.Client({intents:["Guilds", "GuildMembers", "GuildMessages","MessageContent"]});

const client2 = new Discord.Client({intents:["Guilds", "GuildMembers", "GuildMessages","MessageContent"]});

// Create a new class bot
const Bot = new arabtools.bot(client);

Start MultiCast

To start sending message to all your members, use the MultiCast method:

// Start the MultiCast
const data = await Bot.MultiCast({
    guildID: '12345677890',
    message: "Hi, Here !",
    bots:[client2,client1]
    timeout: 2000,
    mention: true,
    logInfo: false,
});


// Check the MultiCast status
console.log(data);

Quran Audio Player

A simple Quran audio player for Discord bots. This project allows you to play Quran suras using Discord's voice system. The suras can be searched by their name or number, with an optional fuzzy search using the Levenshtein distance algorithm for improved matching.

Features

  • Play Quran Sura: Play a specific sura by name or number in a Discord voice channel.
  • Fuzzy Search: Optionally search suras by name with Levenshtein distance for approximate matches.
  • Voice Connection: Integrates seamlessly with Discord's voice connection for audio playback.

Installation

Prerequisites

To use this library, you need to have:

  • Node.js (v16 or higher recommended)
  • A Discord bot with voice channel access

Steps

  1. Install the arab-tools npm module:
    npm i arab-tools@latest
  1. Set up your Discord bot: Ensure that your Discord bot is configured and has permission to join and speak in voice channels. You can find instructions on setting up a Discord bot here.

Usage

Import the Quran Class

In your bot’s code, import and initialize the Quran class.

const arabtool = require("arabtools");

const client = new Discord.Client({intents:["Guilds", "GuildMembers", "GuildMessages","MessageContent"]});
// Create a new Quran player instance
const arabtools = new arabtool.bot(client)

Play a Sura

To play a sura by its name or number, use the play method. This will automatically fetch the corresponding audio and play it in the provided voice connection.

// Play a sura by name
await arabtools.quran.play("Al-Fatiha", voiceConnection);

// Play a sura by number
await arabtools.quran.play(1, voiceConnection);

//Play a sura by a stringified number
await arabtools.quran.play('1', voiceConnection)

//Play a sura by the arabic name
await arabtools.quran.play('الفاتحة', voiceConnection)

Stop the Playback

To stop the audio playback and disconnect from the voice channel, use the stop method:

await arabtools.quran.stop(voiceConnection);

Get Random Zekr/Ahadith

Functions that return random zekr/ahadith. you can add more by contributing!

arabtools.quran.getRandomZekr()

arabtools.quran.getRandomHadith()

Convert to Hejri Function!

Just know that this is not 100% accurate, it can be off by a day or so.

arabtools.quran.convertToHejri(Date.now())

Quizes

This returns a quesiton with 4 answers, 3 wrong and 1 right.

arabtools.quran.quiz()
//output: {name: "question", answers: [{"shuffledAnswers"}]}

API

Quran Class

The Quran class provides methods to play suras and manage the audio playback.

play(suraName: string | number, voiceConnection: VoiceConnection, useLevenshtein: boolean = false): Promise<void>

Plays the audio of a sura based on its name or number.

  • Parameters:
    • suraName (string | number): The name or number of the sura to play.
    • voiceConnection (VoiceConnection): The voice connection to subscribe to.
    • useLevenshtein (boolean, optional): If true, performs fuzzy searching for the sura name using Levenshtein distance. Default is false.
  • Returns: A promise that resolves when the sura starts playing.
  • Throws: An error if the sura is not found.

stop(voiceConnection: VoiceConnection): Promise<void>

Stops the current audio playback and disconnects from the voice channel.

  • Parameters:
    • voiceConnection (VoiceConnection): The voice connection to destroy.
  • Returns: A promise that resolves once the connection is destroyed.

Private Methods (Used Internally)

  • findSuraFromName(name: string, useLevenshtein: boolean = false): Sura | null - Searches for a sura by name, optionally using Levenshtein distance.
  • findSuraFromNumber(id: {number: string | number} | null): Sura | null - Searches for a sura by its number.
  • isNumber(str: string): boolean - Utility function to check if a string represents a number.

Sura Data

The suras data is stored in a JSON file (suras.json) in the following format:

{
  "001": {
    "ar": "الفاتحة",
    "eng": "Al-Fatiha",
    "number": "001"
  },
  "002": {
    "ar": "البقرة",
    "eng": "Al-Baqarah",
    "number": "002"
  },
  ...
}

Each sura has the following fields:

  • ar: Arabic name of the sura.
  • eng: English name of the sura.
  • number: The sura's number.

If you have any questions regarding the npm module please join our discord server for support.

1.3.3

1 month ago

1.2.5

1 month ago

1.2.4

1 month ago

1.3.2

1 month ago

1.2.3

1 month ago

1.3.1

1 month ago

1.3.0

1 month ago

1.2.0

1 month ago

1.1.1

1 month ago

1.1.0

1 month ago

1.0.9

1 month ago

1.2.2

1 month ago

1.2.1

1 month ago

2.0.1

1 month ago

2.0.0

1 month ago

1.0.5

6 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago