CREATORS/OnecreatorsbotPublic · Bot Template

ProfileTelegram

AIThe bot manages a membership club called CREATORS. Users can apply for membership, view their status, and receive payment instructions. Administrators can approve or reject applications, set subscription prices, configure payment details, and review pending payments. The bot stores data in a database, sends notifications to users and admins, and handles payment receipts via photo or document uploads.

Commercemembershipsubscriptionpaymentsadmincreatortelegram
22 commands1 envUpdated 20d agoCreated Oct 6, 2026
Back to folder

commands/_apply.js

javascript · 55 lines

Raw
1/**#command2name: /apply3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12const existing = await db.user.get("membership_status");13 14if (existing === "pending") {15  await Api.sendMessage({16    chat_id: chat.id,17    text: "✦ درخواست عضویت شما قبلاً ثبت شده است.\n\nنتیجه بررسی پس از بررسی درخواست، برای شما اعلام خواهد شد."18  });19 20} else if (existing === "approved" || existing === "active") {21  await Api.sendMessage({22    chat_id: chat.id,23    text: "✦ شما در حال حاضر در مرحله عضویت هستید."24  });25 26} else {27 28  await db.user.set("membership_status", "pending");29 30  // فقط یک پیام برای متقاضی31  await Api.sendMessage({32    chat_id: chat.id,33 text: "✦ درخواست عضویت شما ثبت شد ، نتیجه پس از بررسی به شما اعلام می گردد ✦"34  });35 36  // ارسال درخواست برای مدیر37  await Api.sendMessage({38    chat_id: Number(process.env.ADMIN_ID),39    text:40      "✦ درخواست عضویت جدید\n\n" +41      "نام: " + (user.first_name || "-") + "\n" +42      "نام خانوادگی: " + (user.last_name || "-") + "\n" +43      "Username: @" + (user.username || "-") + "\n" +44      "Telegram ID: " + user.id + "\n\n" +45      "وضعیت: در انتظار بررسی",46    reply_markup: {47      inline_keyboard: [48        [49          { text: "✅ تأیید", callback_data: "approve_" + user.id },50          { text: "❌ رد", callback_data: "reject_" + user.id }51        ]52      ]53    }54  });55    }