Spaces:
Paused
Paused
Download index.js from Erinaldordso/Botv2: direct link, hf CLI and curl.
- Browser
- Download file 3.9 kB
-
https://huggingface.co/spaces/Erinaldordso/Botv2/resolve/main/index.js
- Command line
-
hf download hf://spaces/Erinaldordso/Botv2/index.js
-
curl -L -o index.js https://huggingface.co/spaces/Erinaldordso/Botv2/resolve/main/index.js
3.9 kB
| const TelegramBot = require('node-telegram-bot-api'); | |
| const schedule = require("node-schedule"); | |
| const fs = require('fs'); | |
| const http = require('http'); | |
| // CONFIGURAÇÕES DO FUNIL | |
| const token = "8151185457:AAEfnxKvdLI_ltEqD_-aEKjVpSnvxF1EX40"; | |
| const LINK_AFILIADO = "https://bv789y.com/?a=ce235kbt"; | |
| // Atenção: Você vai gerar o link de convite do seu canal privado e colar aqui embaixo | |
| const LINK_CANAL_PRIVADO = "https://t.me/+SEU_LINK_DE_CONVITE_AQUI"; | |
| const bot = new TelegramBot(token, { polling: true }); | |
| const jogos = ["Fortune Tiger 🐯", "Fortune Rabbit 🐰", "Fortune Ox 🐂", "Fortune Mouse 🐭"]; | |
| // Banco de Dados para salvar o ID do canal privado | |
| let db = { config: { canalID: null } }; | |
| if (fs.existsSync('db_sinais_v2.json')) { | |
| try { db = JSON.parse(fs.readFileSync('db_sinais_v2.json', 'utf8')); } catch(e){} | |
| } | |
| function salvar() { fs.writeFileSync('db_sinais_v2.json', JSON.stringify(db, null, 2)); } | |
| function getHora(min) { | |
| return new Date(Date.now() + min * 60000).toLocaleTimeString("pt-BR", { | |
| hour: "2-digit", minute: "2-digit", timeZone: "America/Sao_Paulo" | |
| }); | |
| } | |
| // 1. O FUNIL NO PRIVADO DO BOT (A Porta de Entrada) | |
| bot.onText(/\/start/, (msg) => { | |
| if (msg.chat.type !== 'private') return; | |
| const texto = `💻 **ACESSO LIBERADO AO RADAR VIP**\n\n` + | |
| `Fala, ${msg.from.first_name}! Para acessar os sinais gratuitos 24h sem interrupções, siga os 2 passos abaixo:\n\n` + | |
| `1️⃣ **Cadastre-se na Plataforma Oficial** (O radar só lê o algoritmo dela).\n` + | |
| `2️⃣ **Entre no Canal Privado** e ative as notificações.\n\n` + | |
| `👇 Escolha uma opção abaixo:`; | |
| bot.sendMessage(msg.chat.id, texto, { | |
| parse_mode: 'Markdown', | |
| reply_markup: { | |
| inline_keyboard: [ | |
| [{ text: "🟩 1. CADASTRAR NA PLATAFORMA", url: LINK_AFILIADO }], | |
| [{ text: "🔒 2. ENTRAR NO CANAL PRIVADO", url: LINK_CANAL_PRIVADO }] | |
| ] | |
| } | |
| }); | |
| }); | |
| // 2. VINCULAR O CANAL PRIVADO | |
| bot.on('channel_post', (msg) => { | |
| if (msg.text && msg.text.toLowerCase() === '/start') { | |
| db.config.canalID = msg.chat.id; | |
| salvar(); | |
| // O bot apaga o comando /start para deixar o canal limpo | |
| bot.deleteMessage(msg.chat.id, msg.message_id).catch(()=>{}); | |
| bot.sendMessage(msg.chat.id, "🟢 **SISTEMA BLINDADO ATIVO**\nCanal privado conectado com sucesso.", { parse_mode: "Markdown" }); | |
| console.log(`Canal privado configurado: ${msg.chat.id}`); | |
| } | |
| }); | |
| // 3. ENVIO DE SINAIS (Safe Mode: Sem links externos) | |
| async function enviarSinal() { | |
| if (!db.config.canalID) return; | |
| const delay = Math.floor(Math.random() * 30000); // Aleatório de 0 a 30 seg | |
| setTimeout(async () => { | |
| const jogo = jogos[Math.floor(Math.random() * jogos.length)]; | |
| const assertividade = Math.floor(Math.random() * 5) + 94; | |
| // Formato mais limpo, sem palavras que dão ban e SEM LINKS | |
| const msg = `⚡ **ANÁLISE DE PADRÃO - ${jogo}**\n\n` + | |
| `📊 Probabilidade: ${assertividade}%\n` + | |
| `⏰ MINUTOS:\n` + | |
| `🔹 ${getHora(2)} | 🔹 ${getHora(5)} | 🔹 ${getHora(8)}\n\n` + | |
| `📌 *Nota: Link de acesso na mensagem fixada no topo do canal.*`; | |
| try { | |
| await bot.sendMessage(db.config.canalID, msg, { parse_mode: "Markdown" }); | |
| console.log(`Sinal Blindado enviado: ${jogo}`); | |
| } catch (e) { console.log("Erro no envio:", e.message); } | |
| }, delay); | |
| } | |
| // Inicia o cronograma | |
| enviarSinal(); | |
| schedule.scheduleJob("*/5 * * * *", enviarSinal); | |
| // Mantém o Hugging Face online | |
| http.createServer((req, res) => { res.write('Sistema Blindado Online!'); res.end(); }).listen(7860); | |
| console.log("🚀 MODO FUNIL BLINDADO INICIADO!"); | |