npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@ab0malek/discord-bot-creator

v1.0.0

Published

A simple and easy package to create and manage Discord bots using user accounts' tokens and the Discord API

Downloads

10

Readme

Discord Bot Creator

مكتبة بسيطة وسهلة لإنشاء وإدارة بوتات Discord باستخدام توكنات حسابات المستخدمين وواجهة برمجة تطبيقات Discord.

المميزات الرئيسية 🌟

  • إنشاء بوتات Discord تلقائياً
  • دعم المصادقة الثنائية (2FA)
  • دعم البروكسي (SOCKS5/HTTP)
  • التعامل التلقائي مع حدود معدل الطلبات
  • حفظ التوكنات في ملف
  • تجاوز الحذف التلقائي للبوتات
  • واجهة برمجة سهلة الاستخدام
  • أحداث مخصصة للتتبع

التثبيت 📦

npm install discord-bot-creator

الاستخدام الأساسي 🚀

مثال بسيط

const TokenCreator = require('discord-bot-creator');

// إنشاء مثيل جديد
const creator = new TokenCreator({
    tokens: [
        {
            token: "توكن_حساب_المستخدم",
            twoFactorKey: "مفتاح_المصادقة_الثنائية", // اختياري
            password: "كلمة_المرور" // مطلوب إذا كان الحساب يستخدم المصادقة الثنائية بكلمة المرور
        }
    ],
    userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
    nameFormat: "بوت_{0}", // {0} سيتم استبداله برقم عشوائي
    enableIntents: true // تمكين صلاحيات البوت
});

// بدء إنشاء البوتات
creator.start({
    pathToSaveTokens: "./tokens.json", // مسار حفظ التوكنات (اختياري)
    loopCount: 5, // عدد البوتات المراد إنشاؤها
    loopWait: 10000 // وقت الانتظار بين كل عملية إنشاء (بالميلي ثانية)
}).then(tokens => {
    console.log("تم إنشاء البوتات بنجاح:", tokens);
}).catch(err => {
    console.error("حدث خطأ:", err);
});

الخيارات المتقدمة 🛠️

استخدام البروكسي

const creator = new TokenCreator({
    tokens: [...],
    userAgent: "...",
    proxy: "socks5://user:pass@host:port" // أو "http://user:pass@host:port"
});

تخصيص تنسيق أسماء البوتات

const creator = new TokenCreator({
    tokens: [...],
    userAgent: "...",
    nameFormat: "MyBot_{0}" // سيتم إنشاء بوتات بأسماء مثل: MyBot_1234, MyBot_5678
});

استخدام الأحداث

// عند إنشاء توكن جديد
creator.on('tokenCreated', (data) => {
    console.log('تم إنشاء بوت جديد:', {
        botID: data.botID,
        name: data.name,
        token: data.token,
        userToken: data.userToken,
        haveTwoFactor: data.haveTwoFactor
    });
});

// عند وجود توكن غير صالح
creator.on('tokenInvalid', (tokenData) => {
    console.log('توكن غير صالح:', tokenData);
});

التعامل مع المصادقة الثنائية 🔐

المصادقة باستخدام TOTP (Google Authenticator)

const creator = new TokenCreator({
    tokens: [
        {
            token: "توكن_الحساب",
            twoFactorKey: "مفتاح_TOTP_السري" // المفتاح السري من Google Authenticator
        }
    ],
    userAgent: "..."
});

المصادقة باستخدام كلمة المرور

const creator = new TokenCreator({
    tokens: [
        {
            token: "توكن_الحساب",
            password: "كلمة_المرور" // كلمة مرور الحساب للمصادقة الثنائية
        }
    ],
    userAgent: "..."
});

حفظ التوكنات 💾

عند تحديد pathToSaveTokens، سيتم حفظ كل توكن تم إنشاؤه في الملف المحدد بالتنسيق التالي:

[
    {
        "botID": "123456789",
        "name": "MyBot_1234",
        "token": "توكن_البوت",
        "userToken": "توكن_المستخدم",
        "haveTwoFactor": true
    }
]

الأخطاء الشائعة وحلولها 🔧

  1. خطأ: "tokens must be an array"

    • تأكد من أن tokens هو مصفوفة من الكائنات
  2. خطأ: "userAgent must be set first"

    • يجب تعيين User-Agent قبل بدء الإنشاء
    • استخدم setUserAgent() أو قم بتمريره في الخيارات
  3. خطأ: "proxy must be a [socks5|http] proxy"

    • تأكد من أن عنوان البروكسي يبدأ بـ "socks5://" أو "http://"
  4. خطأ: "nameFormat must include {0}"

    • يجب أن يحتوي تنسيق الاسم على "{0}" ليتم استبداله برقم عشوائي

نصائح وأفضل الممارسات 💡

  1. استخدام البروكسي

    • يُنصح دائماً باستخدام بروكسي لتجنب الحظر
    • تأكد من أن البروكسي سريع وموثوق
  2. وقت الانتظار

    • استخدم loopWait مناسب (10000ms على الأقل)
    • زيادة الوقت يقلل من فرص الحظر
  3. حفظ التوكنات

    • دائماً قم بتحديد pathToSaveTokens
    • احتفظ بنسخة احتياطية من التوكنات
  4. المصادقة الثنائية

    • TOTP أكثر أماناً من كلمة المرور
    • احتفظ بالمفاتيح السرية بشكل آمن

الأمان 🔒

  1. لا تشارك توكنات الحسابات أو مفاتيح المصادقة الثنائية
  2. استخدم دائماً اتصال آمن عند استخدام المكتبة
  3. قم بتشفير ملفات التوكنات المحفوظة
  4. لا تقم بنشر التوكنات في مستودعات عامة

المساهمة 🤝

نرحب بالمساهمات! إذا وجدت مشكلة أو لديك اقتراح للتحسين:

  1. قم بفتح issue جديد
  2. أو قم بإنشاء pull request
  3. اتبع إرشادات المساهمة في الملف CONTRIBUTING.md

الترخيص 📄

هذا المشروع مرخص تحت MIT License

إخلاء المسؤولية ⚠️

استخدم هذه المكتبة على مسؤوليتك الخاصة. تأكد من اتباع شروط خدمة Discord وسياساتهم.