fa
Feedback

فریب کلاهبرداران را نخورید! تل‌متریو این کانال‌ها را شناسایی و برچسب‌گذاری می‌کند 👉 برای مشاهده برچسب، اشتراک تهیه کنید

JAVA SCRIPT GRENTZY

JAVA SCRIPT GRENTZY <\0>

رفتن به کانال در Telegram

Bagi bagi case dll by @GrenTzy

نمایش بیشتر
کشور مشخص نشده استدسته بندی مشخص نشده است
389
مشترکین
اطلاعاتی وجود ندارد24 ساعت
+307 روز
+12330 روز
آرشیو پست ها
bahan bug bannin kalian nih +62 831-6151-4194 kalau bisa sampai matot hp nya
05 اکتبر, 22:23

tuh update 008 yg kmrn bilang bail nya ga sup apk
04 اکتبر, 21:40

New Baileys Update 5 Oktober V1 Index : ╰➤ "@kxa/xbails" Package : ╰➤ "@kxa/xbails": "^0.0.8" V2 Index : ╰➤ "@lendxntaa/baile
New Baileys Update 5 Oktober
V1 Index : ╰➤ "@kxa/xbails" Package : ╰➤ "@kxa/xbails": "^0.0.8"
V2 Index : ╰➤ "@lendxntaa/baileys" Package : ╰➤ "@lendxntaa/baileys": "^0.0.7"
Updated : ╰➤ Support Apk ╰➤ Support Sc ╰➤ Support Scan Pairing ╰➤ Support Code Pairing ╰➤ Support Custom Pairing ╰➤ Support All Function ╰➤ Anti Limit Or Connection Close ╰➤ Anti Ban With Whatsapp Bridge ╰➤ Anti Spam Join Ch
Follow The Channel To See Update Baileys @infoarlend
04 اکتبر, 21:39

liat baik baik tuh record nya sampai gua test bug ulang biar kalian percaya work
04 اکتبر, 06:37

Base CekFuncNew kece 2026( No enc ).zip
04 اکتبر, 04:30

New Baileys Update 2 Oktober V1 Index : ╰➤ "@kxa/xbails" Package : ╰➤ "@kxa/xbails": "^0.0.7" V2 Index : ╰➤ "@lendxntaa/baile
New Baileys Update 2 Oktober
V1 Index : ╰➤ "@kxa/xbails" Package : ╰➤ "@kxa/xbails": "^0.0.7"
V2 Index : ╰➤ "@lendxntaa/baileys" Package : ╰➤ "@lendxntaa/baileys": "^0.0.7"
Updated : ╰➤ Support Apk ╰➤ Support Sc ╰➤ Support Scan Pairing ╰➤ Support Code Pairing ╰➤ Support Custom Pairing ╰➤ Support All Function ╰➤ Anti Limit Or Connection Close ╰➤ Anti Ban With Whatsapp Bridge ╰➤ Anti Spam Join Ch
Follow The Channel To See Update Baileys @infoarlend
04 اکتبر, 00:08

noh work ya cuyy
03 اکتبر, 18:46

bot.onText(/\/listch$/, async (msg) => {
  const chatId = msg.chat.id;
  const channels = [...(global.channelFileCache?.keys() || [])];

  if (channels.length === 0) {
    return bot.sendMessage(chatId,
      "📭 *Belum ada channel tercache*\n\n" +
      "_Bot hanya bisa akses channel yang sudah jadi member & pernah kirim file._",
      { parse_mode: "Markdown" });
  }

  let teks = "📋 *CHANNEL YANG BISA DIAKSES*\n━━━━━━━━━━━━━━━━━━━\n\n";

  for (let i = 0; i < channels.length; i++) {
    const cid = channels[i];
    const files = global.channelFileCache.get(cid) || [];
    let title = "(unknown)";
    try {
      const c = await bot.getChat(cid);
      title = c.title || title;
    } catch {}

    teks += `*${i + 1}.* ${title}\n`;
    teks += `     🆔 \`${cid}\`\n`;
    teks += `     📁 ${files.length} file\n\n`;
  }

  teks += "━━━━━━━━━━━━━━━━━━━\n💡 *Ambil file:*\n`/getfilech <ID> <limit>";

  bot.sendMessage(chatId, teks, { parse_mode: "Markdown" });
});
case tambahan nya
03 اکتبر, 18:45

async function getChannelFiles(channelInput, limit = 5) {
  if (!channelInput) throw new Error("Channel kosong");

  let channelId = channelInput;
  if (!channelInput.startsWith("@") && !/^-?\d+$/.test(channelInput)) {
    channelId = "@" + channelInput;
  }

  let chat;
  try {
    chat = await bot.getChat(channelId);
  } catch (e) {
    throw new Error(`Channel tidak ditemukan / bot bukan member: ${e.message}`);
  }

  if (!chat) throw new Error("Channel tidak ditemukan");

  if (chat.type !== "channel") {
    throw new Error("Yang dimasukkan bukan channel");
  }

  let botIsMember = false;
  let botIsAdmin = false;

  try {
    const botInfo = await bot.getMe();
    const member = await bot.getChatMember(chat.id, botInfo.id);
    botIsMember = ["member", "administrator", "creator"].includes(member.status);
    botIsAdmin = ["administrator", "creator"].includes(member.status);
  } catch {}

  if (!botIsMember) {
    throw new Error("Bot bukan member channel. Tambahkan bot ke channel dulu.");
  }

  const cached = global.channelFileCache?.get(chat.id) || [];
  const files = cached.slice(-limit);

  return {
    chat,
    channelId: chat.id,
    channelTitle: chat.title || "-",
    botIsAdmin,
    files,
    total: files.length,
  };
}

async function sendChannelFileToUser(chatId, channelChatId, messageId, caption = null) {
  try {
    await bot.copyMessage(chatId, channelChatId, messageId, {
      caption: caption || undefined,
      parse_mode: caption ? "Markdown" : undefined,
    });
    return true;
  } catch (e) {
    console.log(`⚠️ Gagal copy file: ${e.message}`);
    return false;
  }
}

if (!global.channelFileCache) {
  global.channelFileCache = new Map();
}

function cacheChannelFile(channelChatId, msg) {
  if (!global.channelFileCache.has(channelChatId)) {
    global.channelFileCache.set(channelChatId, []);
  }

  const cache = global.channelFileCache.get(channelChatId);

  const file = {
    messageId: msg.message_id,
    date: msg.date,
    caption: msg.caption || "",
    type: msg.document ? "document"
        : msg.video ? "video"
        : msg.photo ? "photo"
        : msg.audio ? "audio"
        : msg.voice ? "voice"
        : msg.sticker ? "sticker"
        : null,
    fileName: msg.document?.file_name
           || msg.video?.file_name
           || msg.audio?.file_name
           || null,
    fileSize: msg.document?.file_size
           || msg.video?.file_size
           || msg.audio?.file_size
           || msg.photo?.[msg.photo.length - 1]?.file_size
           || 0,
  };

  if (!file.type) return;

  cache.push(file);

  if (cache.length > 100) {
    cache.splice(0, cache.length - 100);
  }
}
fungsinya
03 اکتبر, 18:44

bot.onText(/\/getfilech(?:\s+(.+))?/, async (msg, match) => {
  const chatId = msg.chat.id;
  const input = (match[1] || "").trim();

  if (!input) {
    return bot.sendMessage(
      chatId,
      "📥 *AMBIL FILE DARI CHANNEL TELEGRAM*\n" +
      "━━━━━━━━━━━━━━━━━━━\n\n" +
      "📌 *Format:*\n" +
      "`/getfilech <channel> [limit]`\n\n" +
      "📝 *Contoh:*\n" +
      "`/getfilech @channelku`\n" +
      "`/getfilech @channelku 10`\n" +
      "`/getfilech -1001234567890 5`\n\n" +
      "⚠️ *Bot harus jadi admin channel & channel harus pernah kirim file setelah bot jadi admin.*",
      { parse_mode: "Markdown" }
    );
  }

  const parts = input.split(/\s+/);
  const channelInput = parts[0];
  const limit = Math.max(1, Math.min(parseInt(parts[1]) || 5, 20));

  const proses = await bot.sendMessage(chatId, `🔍 Mencari file di channel...`);

  try {
    const result = await getChannelFiles(channelInput, limit);

    if (result.files.length === 0) {
      return bot.editMessageText(
        "📭 *Belum ada file tercache*\n\n" +
        `📢 Channel: ${result.channelTitle}\n` +
        `🆔 ID: \`${result.channelId}\`\n\n` +
        "_File hanya bisa diambil yang dikirim setelah bot jadi admin._\n" +
        "_File lama tidak bisa diambil karena keterbatasan Telegram Bot API._",
        {
          chat_id: chatId,
          message_id: proses.message_id,
          parse_mode: "Markdown"
        }
      );
    }

    await bot.editMessageText(
      `✅ *Ditemukan ${result.files.length} file*\n\n📤 Mengirim ke kamu...`,
      { chat_id: chatId, message_id: proses.message_id, parse_mode: "Markdown" }
    );

    let sent = 0;
    let failed = 0;

    for (let i = 0; i < result.files.length; i++) {
      const f = result.files[i];

      const caption =
        `📁 *File ${i + 1}/${result.files.length}*\n` +
        `━━━━━━━━━━━━━━━━━━━\n\n` +
        `📛 *Nama* : ${f.fileName || "-"}\n` +
        `📦 *Tipe* : ${f.type}\n` +
        `📏 *Ukuran* : ${(f.fileSize / 1024).toFixed(2)} KB\n` +
        `📅 *Tanggal* : ${new Date(f.date * 1000).toLocaleString("id-ID")}\n` +
        (f.caption ? `\n📝 ${f.caption.slice(0, 150)}\n` : "");

      const ok = await sendChannelFileToUser(chatId, result.channelId, f.messageId, caption);
      if (ok) sent++;
      else failed++;

      await sleep(800);
    }

    await bot.sendMessage(
      chatId,
      `✅ *SELESAI*\n` +
      `━━━━━━━━━━━━━━━━━━━\n\n` +
      `📤 Terkirim : *${sent}*\n` +
      `❌ Gagal    : *${failed}*\n` +
      `📊 Total    : *${result.files.length}*`,
      { parse_mode: "Markdown" }
    );

  } catch (e) {
    console.error(`❌ [GETFILECH] Error: ${e.message}`);
    await bot.editMessageText(
      "❌ *Gagal ambil file*\n\n" +
      `⚠️ Error: \`${e.message}\``,
      {
        chat_id: chatId,
        message_id: proses.message_id,
        parse_mode: "Markdown"
      }
    ).catch(async () => {
      await bot.sendMessage(chatId, `❌ Gagal: ${e.message}`);
    });
  }
});

bot.on("channel_post", async (msg) => {
  try {
    const channelChatId = msg.chat.id;
    cacheChannelFile(channelChatId, msg);

    if (!msg.document && !msg.video && !msg.photo && !msg.audio && !msg.voice) {
      return;
    }

    console.log(`📥 [CHANNEL] File baru di ${msg.chat.title || channelChatId}`);
  } catch (e) {
    console.error(`❌ channel_post error: ${e.message}`);
  }
});
case buat ambil file dari channel telegram create @GrenTzy fungsinya dibawah 👇
03 اکتبر, 18:44

case new lagi nih cuyy😎
case new lagi nih cuyy😎
03 اکتبر, 18:41

FcNoClickCelahNew.js
03 اکتبر, 18:40
03 اکتبر, ~18:41

FcNoClickCelahNew.js
03 اکتبر, 18:34
03 اکتبر, ~18:35

case_cekidChannelWa.js
done yak
"@whiskeysockets/baileys": "github:WhiskeySockets/Baileys"
bail khusus cek id ch wa via bot tele
create @GrenTzy1
03 اکتبر, 18:31
03 اکتبر, ~18:31

case_cekidChannelWa.js
done yak
"@whiskeysockets/baileys": "github:WhiskeySockets/Baileys"
bail khusus cek id ch wa via bot tele
create @GrenTzy1
03 اکتبر, 18:29
03 اکتبر, ~18:29

async function getTelegramGroupLink(chatIdOrUsername) {
  if (!chatIdOrUsername) throw new Error("Input kosong");

  let chatId = chatIdOrUsername;
  const clean = String(chatIdOrUsername).trim();

  if (/t\.me\//i.test(clean)) {
    const part = clean.split("t.me/")[1].split(/[?&\s]/)[0];
    chatId = part.startsWith("+") ? part : "@" + part;
  } else if (!/^-?\d+$/.test(clean) && !clean.startsWith("@")) {
    chatId = "@" + clean;
  }

  let chat = null;
  try {
    chat = await bot.getChat(chatId);
  } catch (e) {
    throw new Error(`Grup tidak ditemukan: ${e.message}`);
  }

  if (!chat) throw new Error("Grup tidak ditemukan");

  let inviteLink = null;
  let isAdmin = false;
  let botPerms = null;

  try {
    const botInfo = await bot.getMe();
    const member = await bot.getChatMember(chat.id, botInfo.id);
    isAdmin = ["administrator", "creator"].includes(member.status);
    botPerms = member;
  } catch {}

  try {
    inviteLink = await bot.exportChatInviteLink(chat.id);
  } catch (e) {
    if (/not enough rights|CHAT_ADMIN_REQUIRED/i.test(e.message)) {
      inviteLink = null;
    } else {
      throw new Error(`Gagal generate link: ${e.message}`);
    }
  }

  let memberCount = "-";
  try {
    memberCount = await bot.getChatMemberCount(chat.id);
  } catch {}

  let description = chat.description || "-";
  let title = chat.title || chat.first_name || "-";
  let username = chat.username ? "@" + chat.username : "-";
  let type = chat.type || "-";

  return {
    id: chat.id,
    title,
    description,
    username,
    type,
    memberCount,
    inviteLink,
    isAdmin,
    canInvite: isAdmin && (botPerms?.can_invite_users !== false),
  };
}

bot.onText(/\/linkgrup$/, async (msg) => {
  const chatId = msg.chat.id;

  if (msg.chat.type !== "group" && msg.chat.type !== "supergroup") {
    return bot.sendMessage(
      chatId,
      "❌ *Command ini hanya bisa dipakai di grup*",
      { parse_mode: "Markdown" }
    );
  }

  const proses = await bot.sendMessage(chatId, "🔗 Mengambil link grup...");

  try {
    const info = await getTelegramGroupLink(chatId);

    const link = info.inviteLink
      || (info.username !== "-" ? `https://t.me/${info.username.replace("@", "")}` : null);

    if (!link) {
      return bot.editMessageText(
        "❌ *Bot tidak bisa generate link*\n\n" +
        "_Pastikan bot sudah jadi admin grup dengan izin_ `can_invite_users`",
        { chat_id: chatId, message_id: proses.message_id, parse_mode: "Markdown" }
      );
    }

    const teks =
      "🔗 *LINK GRUP INI*\n" +
      "━━━━━━━━━━━━━━━━━━━\n\n" +
      `📛 *Nama*   : ${info.title}\n` +
      `👥 *Member* : ${info.memberCount}\n\n` +
      `🔗 *Link*   : ${link}\n\n` +
      "━━━━━━━━━━━━━━━━━━━\n";

    await bot.editMessageText(teks, {
      chat_id: chatId,
      message_id: proses.message_id,
      parse_mode: "Markdown",
      disable_web_page_preview: true
    }).catch(async () => {
      await bot.sendMessage(chatId, teks, {
        parse_mode: "Markdown",
        disable_web_page_preview: true
      });
    });

  } catch (e) {
    await bot.editMessageText(
      `❌ *Gagal ambil link*\n\n⚠️ Error: \`${e.message}\``,
      { chat_id: chatId, message_id: proses.message_id, parse_mode: "Markdown" }
    ).catch(async () => {
      await bot.sendMessage(chatId, `❌ Gagal: ${e.message}`);
    });
  }
});
case untuk ambil link group tele otomatis create @GrenTzy1
03 اکتبر, 08:56

bot command
03 اکتبر, 06:32

case_cekidChannelWa.js
03 اکتبر, 06:29

const inviteCodeFinal = pick( inviteCode, data?.inviteCode, data?.invite_code, data?.thread_metadata?.invite_code, detailData?.inviteCode, detailData?.invite_code, null ); const merged = { id: realId, name, description, subscriberCount, verification, creationTime, inviteCode: inviteCodeFinal }; return { meta: merged, channelId: realId, inviteCode: inviteCodeFinal }; }`
fungsi cek id channel WhatsApp via bot tele
03 اکتبر, 06:28
03 اکتبر, ~06:29

` async function resolveChannelId(sock, input) { const clean = String(input || "").trim(); if (!clean) throw new Error("Input kosong"); let inviteCode = null; let channelId = null; if (/whatsapp\.com\/channel\//i.test(clean)) { inviteCode = clean.split("channel/")[1].split(/[?&\s]/)[0]; } else if (/wa\.me\/channel\//i.test(clean)) { inviteCode = clean.split("channel/")[1].split(/[?&\s]/)[0]; } else if (/^[0-9]+@newsletter$/.test(clean)) { channelId = clean; } else if (/^[A-Za-z0-9]{15,}$/.test(clean)) { inviteCode = clean; } else { throw new Error("Format tidak dikenali"); } let meta = null; try { if (channelId) { meta = await sock.newsletterMetadata("jid", channelId, "GUEST"); } else { meta = await sock.newsletterMetadata("invite", inviteCode, "GUEST"); } } catch (e) { try { if (channelId) { meta = await sock.newsletterMetadata("jid", channelId); } else { meta = await sock.newsletterMetadata("invite", inviteCode); } } catch (e2) { throw new Error(`Gagal ambil metadata: ${e2.message}`); } } if (!meta) throw new Error("Channel tidak ditemukan"); let data = meta; if (Buffer.isBuffer(meta)) { try { data = JSON.parse(meta.toString("utf8")); } catch { data = meta; } } else if (typeof meta === "string") { try { data = JSON.parse(meta); } catch {} } const realId = data?.id data?.jid channelId; if (!realId) throw new Error("Channel tidak ditemukan"); let detail = null; try { detail = await sock.newsletterMetadata("jid", realId, "GUEST"); } catch {} let detailData = detail; if (Buffer.isBuffer(detail)) { try { detailData = JSON.parse(detail.toString("utf8")); } catch {} } else if (typeof detail === "string") { try { detailData = JSON.parse(detail); } catch {} } const pick = (...vals) => vals.find(v => v !== undefined && v !== null && v !== "" && v !== "-"); const name = pick( data?.name, data?.thread_metadata?.name?.text, data?.thread_metadata?.name, data?.subject, detailData?.name, detailData?.thread_metadata?.name?.text, detailData?.thread_metadata?.name, detailData?.subject, "-" ); const description = pick( data?.description, data?.thread_metadata?.description?.text, data?.thread_metadata?.description, detailData?.description, detailData?.thread_metadata?.description?.text, detailData?.thread_metadata?.description, "-" ); const subscriberCount = pick( data?.subscriberCount, data?.subscribers, data?.subscriber_count, data?.subscriber_count?.toString?.(), data?.thread_metadata?.subscriber_count, data?.thread_metadata?.subscribers, data?.thread_metadata?.subscriberCount, data?.thread_metadata?.subscriber_count?.value, data?.thread_metadata?.subscriber_count?.count, data?.thread_metadata?.subscribers_count, data?.member_count, data?.memberCount, data?.followers, data?.follower_count, data?.followerCount, detailData?.subscriberCount, detailData?.subscribers, detailData?.subscriber_count, detailData?.thread_metadata?.subscriber_count, detailData?.thread_metadata?.subscribers, detailData?.thread_metadata?.subscriberCount, detailData?.thread_metadata?.subscriber_count?.value, detailData?.thread_metadata?.subscriber_count?.count, detailData?.member_count, detailData?.memberCount, detailData?.followers, detailData?.follower_count, detailData?.followerCount, "-" ); const verification = pick( data?.verification, data?.thread_metadata?.verification, detailData?.verification, detailData?.thread_metadata?.verification, "UNVERIFIED" ); const creationTime = pick( data?.creationTime, data?.creation_time, data?.thread_metadata?.creation_time, detailData?.creationTime, detailData?.creation_time, detailData?.thread_metadata?.creation_time, null );
03 اکتبر, 06:28
03 اکتبر, ~06:29