manafzz147/Shenskyx_botPublic · Bot Template

ProfileTelegram

AIshen appears to be a Telegram automation bot. Commands include /start, /menu_edit_basic, /buyvps, /vps, /admin, /order_basic, /kirim_pair, /order_pro. Observed in code: messaging, keyboards.

Utilityutility
16 commands0 envUpdated 1mo agoCreated Sep 4, 2026
Back to folder

commands/_buyvps.js

javascript · 85 lines

Raw
1/**#command2name: /buyvps3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12if (request && request.id) {13  Api.answerCallbackQuery({ callback_query_id: request.id });14}15 16function fixHtml(text) {17  if (!text) return "";18  return String(text)19    .replace(/&/g, "&amp;")20    .replace(/</g, "&lt;")21    .replace(/>/g, "&gt;");22}23 24function formatRupiah(angka) {25  return Number(angka).toLocaleString('id-ID');26}27 28// Set default harga Basic (Rp 5.000) dan Pro (Rp 15.000)29let priceBasic = Bot.getProperty("price_basic") || 5000;30let pricePro = Bot.getProperty("price_pro") || 15000;31 32let ramFree = Bot.getProperty("ram_free") || "512 MB";33let cpuFree = Bot.getProperty("cpu_free") || "1 vCPU";34 35let ramBasic = Bot.getProperty("ram_basic") || "1 GB";36let cpuBasic = Bot.getProperty("cpu_basic") || "1 vCPU";37 38let ramPro = Bot.getProperty("ram_pro") || "2 GB";39let cpuPro = Bot.getProperty("cpu_pro") || "2 vCPU";40 41let teksKatalog = "🛒 <b>PILIH PAKET VPS</b>\n" +42                  "═══════════════════════\n\n" +43                  "🎁 <b>Paket Free (Trial)</b>\n" +44                  "• Spec: " + fixHtml(cpuFree) + " / " + fixHtml(ramFree) + "\n" +45                  "• Harga: <b>GRATIS</b>\n\n" +46                  "🔹 <b>Paket Basic</b>\n" +47                  "• Spec: " + fixHtml(cpuBasic) + " / " + fixHtml(ramBasic) + "\n" +48                  "• Harga: Rp " + formatRupiah(priceBasic) + "/bulan\n\n" +49                  "🔹 <b>Paket Pro</b>\n" +50                  "• Spec: " + fixHtml(cpuPro) + " / " + fixHtml(ramPro) + "\n" +51                  "• Harga: Rp " + formatRupiah(pricePro) + "/bulan\n\n" +52                  "<i>Klik tombol di bawah ini untuk mengklaim paket Free atau memesan paket pilihan Anda:</i>";53 54let keyboard = {55  inline_keyboard: [56    [57      { text: "🎁 Klaim VPS Free", callback_data: "/order_free" }58    ],59    [60      { text: "📦 Beli Basic (Rp " + formatRupiah(priceBasic) + ")", callback_data: "/order_basic" }61    ],62    [63      { text: "📦 Beli Pro (Rp " + formatRupiah(pricePro) + ")", callback_data: "/order_pro" }64    ],65    [66      { text: "⬅️ Kembali", callback_data: "/vps" },67      { text: "🏠 Menu Utama", callback_data: "/start" }68    ]69  ]70};71 72if (request && request.message) {73  Api.editMessageText({74    message_id: request.message.message_id,75    text: teksKatalog,76    parse_mode: 'HTML',77    reply_markup: keyboard78  });79} else {80  Api.sendMessage({81    text: teksKatalog,82    parse_mode: 'HTML',83    reply_markup: keyboard84  });85}