Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // DEFINIÇÕES
- const zerosite = "https://zero-two-apis.com.br"
- const API_KEY_ZEROTWO = "SUA_KEY"
- // COMPRA DA KEY E FEITA DE FORMA TOTALMENTE AUTOMATIZADA LA PELO SITE DA API DA ZERO TWO, VOCÊ IRÁ ESCOLHER O VALOR QUE CADA 1K DE REQUEST CUSTA R$1, ESCOLHENDO IRA GERAR O QRCODE E O CÓDIGO COPIA E COLA, QUANDO FOR FAZER O PAGAMENTO, NÃO DEIXE A PÁGINA LA DO SITE FECHAR POR QUE APÓS PAGAR ELA IRÁ TE RELEDICIONAR PRA UMA NOVA PÁGINA AONDE VOCÊ IRÁ DEFINIR O NOME DE SUA KEY, APÓS DEFINIDO SO SALVAR E PRONTO!
- /*
- * VENHA FAZER PARTE DE NOSSA COMUNIDADE ZERO TWO, CONHEÇA A MELHOR ㅤREST API DO MOMENTO COM ATUALIZAÇÕES DIARIAMENTE COM O OBJETIVO DE ㅤㅤSEMPRE TRAZER AS MELHORES APIS PRA VOCÊ USAR EM SEU PROJETO E COM ㅤㅤFOCO 100% EM MANTER TODAS ELAS ATIVAS AONDE SE ALGUMA CAIR SE EU NÃO ㅤPERCEBER, TROPINHA DA COMUNIDADE PERCEBE E ME AVISA PRA EU JA ESTA ㅤㅤARRUMANDO.
- * MY CONTACT: https://wa.me/559491569380
- * MY INSTAGRAM: https://instagram.com/lucas_mod_domina
- */
- // COMANDOS DA ANIME GAMES
- case 'animesgames':
- case 'animesgame':
- try {//By: 𖧄 𝐋𝐔𝐂𝐀𝐒 𝐌𝐎𝐃 𝐃𝐎𝐌𝐈𝐍𝐀 𖧄
- //Canal: https://whatsapp.com/channel/0029Va6riekH5JLwLUFI7P2B
- if(!q) return reply('- *[ ‼ ]* _Por favor digite o nome de alguma obra para efetuar a pesquisa_')
- let data = await fetchJson(`${zerosite}/api/search/anime?query=${encodeURIComponent(q)}&apikey=${API_KEY_ZEROTWO}`)
- if(!data.resultado || data.resultado.length < 1) return reply('- *[ 📴 ]* _Nenhum anime foi encontrado!_')
- const listMenu = {
- title: "📺 *Animes Encontrados*",
- sections: [{
- title: `🔍 Resultados para: ${q}`,
- rows: data.resultado.slice(0, 10000).map((anime, index) => ({
- id: `${prefixo}animedl ${anime.link}`,
- title: `[${anime.classificacao.trim()}] ${anime.anime}`,
- description: `📡 ${anime.total_ep} Episódios | ${anime.status}`
- }))
- }]
- }
- const thumbnail = data.resultado[0]?.imageUrl || logoslink.logo
- zerotwo.sendMessage(from, {image: { url: thumbnail }, caption: "⛩️ *Resultados da Pesquisa*", footer: "© " + nomedobot,
- buttons: [{
- buttonId: "anime_menu",
- buttonText: { displayText: "📺 Listar Animes" },
- type: 4,
- nativeFlowInfo: {
- name: "single_select",
- paramsJson: JSON.stringify(listMenu)
- }
- }],
- headerType: 1,
- viewOnce: true
- }, { quoted: info })
- } catch (e) {
- console.error('Erro no comando anime:', e)
- reply("- *[ ❌ ]* _Erro na busca de animes_")
- }
- break
- case 'animedl':
- try {//By: 𖧄 𝐋𝐔𝐂𝐀𝐒 𝐌𝐎𝐃 𝐃𝐎𝐌𝐈𝐍𝐀 𖧄
- //Canal: https://whatsapp.com/channel/0029Va6riekH5JLwLUFI7P2B
- if(!q) return reply('- *[ ‼ ]* _Link do anime não fornecido_')
- let data = await fetchJson(`${zerosite}/api/detalhes/episodio/episode?url=${encodeURIComponent(q)}&apikey=${API_KEY_ZEROTWO}`)
- if (!data.status) return reply('- *[ ❌ ]* _Erro ao obter informações do anime_')
- const anime = data.resultado
- const classificacao = anime.classificacao?.trim() || 'Não informada'
- const generos = anime.generos?.join(', ') || 'Não informado'
- const infoAnime = `*🎬 ${anime.titulo}*\n\n` +
- `📌 *Tipo:* ${anime.tipo}\n` +
- `🗣️ *Linguagem:* ${anime.linguagem}\n` +
- `📅 *Status:* ${anime.status}\n` +
- `🎭 *Gêneros:* ${generos}\n` +
- `✍️ *Autor:* ${anime.autor || 'Não informado'}\n` +
- `🎬 *Diretor:* ${anime.diretor || 'Não informado'}\n` +
- `🏢 *Estúdio:* ${anime.estudio || 'Não informado'}\n` +
- `🎞️ *Total de Episódios:* ${anime.total_ep || 'Desconhecido'}\n` +
- `📀 *OVAs:* ${anime.ovas || '0'}\n` +
- `🔞 *Classificação:* ${classificacao}\n\n` +
- `📖 *Sinopse:* ${(anime.sinopse || '').replace('Sinopse', '')}`
- const listMenu = {
- title: "🎬 *Episódios Disponíveis*",
- sections: [{
- title: `📀 ${anime.titulo}`,
- rows: data.resultado.episodes.reverse().map(ep => ({
- id: `${prefixo}animeplay ${ep.link}`,
- title: ep.episodio,
- description: `📅 ${ep.lancamento || 'Data não disponível'}`
- })).slice(0, 10000)
- }]
- }
- const capaAnime = anime.imgUrl || logoslink.logo
- zerotwo.sendMessage(from, { image: { url: capaAnime }, caption: infoAnime, footer: "© " + nomedobot,
- buttons: [{
- buttonId: "episode_menu",
- buttonText: { displayText: "📥 Listar Episódios" },
- type: 4,
- nativeFlowInfo: {
- name: "single_select",
- paramsJson: JSON.stringify(listMenu)
- }
- }],
- headerType: 1,
- viewOnce: true
- }, { quoted: info })
- } catch (e) {
- console.error('Erro detalhado:', e)
- reply("- *[ ❌ ]* _Erro ao processar o link do anime_")
- }
- break
- case 'animeplay':
- try {//By: 𖧄 𝐋𝐔𝐂𝐀𝐒 𝐌𝐎𝐃 𝐃𝐎𝐌𝐈𝐍𝐀 𖧄
- //Canal: https://whatsapp.com/channel/0029Va6riekH5JLwLUFI7P2B
- if(!q) return reply('- *[ ‼ ]* _Link do episódio não fornecido_')
- const episodeData = await fetchJson(`${zerosite}/api/dados/episodio/download-ep?url=${encodeURIComponent(q)}&apikey=${API_KEY_ZEROTWO}`)
- await zerotwo.relayMessage(from, {
- interactiveMessage: {
- header: proto.Message.InteractiveMessage.Header.create({
- ...(await prepareWAMessageMedia(
- { image: { url: episodeData.resultado.imageURL } },
- { upload: zerotwo.waUploadToServer }
- )),
- hasMediaAttachment: true
- }),
- body: {
- text: `*${episodeData.resultado.title}*\n\n` +
- `📀 Episódio: ${episodeData.resultado.episode}\n` +
- `🗓️ Lançamento: ${episodeData.resultado.releaseDate}\n` +
- `🔊 Áudio: ${episodeData.resultado.audio}`
- },
- footer: { text: "© " + nomedobot },
- nativeFlowMessage: {
- buttons: [{
- name: "quick_reply",
- buttonParamsJson: JSON.stringify({
- display_text: "⬇️ Baixar Agora",
- id: `${prefixo}downloadanime ${episodeData.resultado.videoURL}||${encodeURIComponent(episodeData.resultado.title)}||${encodeURIComponent(episodeData.resultado.episode)}`
- })
- }]
- }
- }
- }, {quoted: info})
- } catch(e) {
- console.error('Erro no animeplay:', e)
- reply('- *[ ❌ ]* _Erro ao carregar detalhes_')
- }
- break
- case 'downloadanime':
- try {//By: 𖧄 𝐋𝐔𝐂𝐀𝐒 𝐌𝐎𝐃 𝐃𝐎𝐌𝐈𝐍𝐀 𖧄
- //Canal: https://whatsapp.com/channel/0029Va6riekH5JLwLUFI7P2B
- if (!q) return reply('- *[ ‼ ]* _URL do vídeo não fornecida_')
- const [videoURL, animeTitleEncoded, episodeNumberEncoded] = q.split('||')
- const animeTitle = decodeURIComponent(animeTitleEncoded || '')
- const episodeNumber = decodeURIComponent(episodeNumberEncoded || '')
- const videoResponse = await fetch(`${zerosite}/api/anime/baixar-video?url=${encodeURIComponent(videoURL)}&apikey=${API_KEY_ZEROTWO}`)
- if (!videoResponse.ok) {
- throw new Error(`Erro HTTP! status: ${videoResponse.status}`)
- }
- let chunks = []
- for await (const chunk of videoResponse.body) {
- chunks.push(chunk)
- }
- const videoBuffer = Buffer.concat(chunks)
- await zerotwo.sendMessage(from, { document: videoBuffer, fileName: `${animeTitle} - Episódio ${episodeNumber}.mp4`, mimetype: 'video/mp4', caption: '📥 *Download realizado com sucesso!*' }, { quoted: info })
- } catch (e) {
- console.error('Erro no download:', e)
- reply('- *[ ❌ ]* _Falha no download, tente novamente_')
- }
- break
- // COMANDOS DA ANIMES ORIGINAL
- case 'animesdigital':
- try {//By: 𖧄 𝐋𝐔𝐂𝐀𝐒 𝐌𝐎𝐃 𝐃𝐎𝐌𝐈𝐍𝐀 𖧄
- //Canal: https://whatsapp.com/channel/0029Va6riekH5JLwLUFI7P2B
- if (!q) return reply('- *[ ‼ ]* _Digite o nome do anime que deseja pesquisar_')
- let searchData = await fetchJson(`${zerosite}/api/anime/search?query=${encodeURIComponent(q)}&apikey=${API_KEY_ZEROTWO}`)
- if (!searchData.status || !searchData.resultado?.length) return reply('- *[ ❌ ]* _Nenhum anime encontrado_')
- const listMenu = {
- title: "🔍 *Resultados da Pesquisa*",
- sections: [{
- title: `📚 Total: ${searchData.resultado.length} Animes`,
- rows: searchData.resultado.map(anime => ({
- id: `${prefixo}animedetails ${anime.link}`,
- title: anime.title,
- description: `🎬 ${anime.year} | ${anime.genres?.join(', ') || 'Sem gêneros'}`
- }))
- }]
- }
- const thumbnail = searchData.resultado[0]?.thumb || logoslink.logo
- zerotwo.sendMessage(from, {image: { url: thumbnail }, caption: "⛩️ *Resultados da Pesquisa*", footer: "© " + nomedobot,
- buttons: [{
- buttonId: "search_results",
- buttonText: { displayText: "📚 Listar Resultados" },
- type: 4,
- nativeFlowInfo: {
- name: "single_select",
- paramsJson: JSON.stringify(listMenu)
- }
- }],
- headerType: 1,
- viewOnce: true
- }, { quoted: info })
- } catch (e) {
- console.error('Erro na pesquisa:', e)
- reply('- *[ ❌ ]* _Erro na pesquisa_')
- }
- break
- case 'animedetails':
- try {//By: 𖧄 𝐋𝐔𝐂𝐀𝐒 𝐌𝐎𝐃 𝐃𝐎𝐌𝐈𝐍𝐀 𖧄
- //Canal: https://whatsapp.com/channel/0029Va6riekH5JLwLUFI7P2B
- if (!q) return reply('- *[ ‼ ]* _Link do anime não fornecido_')
- let data = await fetchJson(`${zerosite}/api/getdetalhes/anime?url=${encodeURIComponent(q)}&apikey=${API_KEY_ZEROTWO}`)
- if (!data.status) return reply('- *[ ❌ ]* _Erro ao obter detalhes do anime_')
- const anime = data.resultado;
- const infoAnime = `*🎬 ${anime.title}*\n\n` +
- `📅 *Ano:* ${anime.year}\n` +
- `✍️ *Autor:* ${anime.author || 'Desconhecido'}\n` +
- `🎬 *Estúdio:* ${anime.studio || 'Desconhecido'}\n` +
- `🎞️ *Total de Episódios:* ${anime.total_ep}\n` +
- `🎭 *Gêneros:* ${anime.genres?.join(', ') || 'Não informado'}\n\n` +
- `📖 *Sinopse:* ${anime.sinopse || 'Sem sinopse'}`
- const listMenu = {
- title: "🎬 *Lista de Episódios*",
- sections: [{
- title: `📀 ${anime.title}`,
- rows: anime.episodes.map(ep => ({
- id: `${prefixo}downloadanime2 ${ep.animeDetails.videoUrl}||${encodeURIComponent(anime.title)}||${ep.animeDetails.episode}`,
- title: `Episódio ${ep.animeDetails.episode}`,
- description: `🗓️ ${ep.lancamento} | 🔊 ${ep.animeDetails.audio}`
- })).reverse().slice(0, 7000)
- }]
- }
- await zerotwo.sendMessage(from, {
- image: { url: anime.imgUrl },
- caption: infoAnime,
- footer: "© " + nomedobot,
- buttons: [{
- buttonId: "episode_list",
- buttonText: { displayText: "📥 Episódios Disponíveis" },
- type: 4,
- nativeFlowInfo: {
- name: "single_select",
- paramsJson: JSON.stringify(listMenu)
- }
- }],
- headerType: 1,
- viewOnce: true
- }, { quoted: info })
- } catch (e) {
- console.error('Erro nos detalhes:', e)
- reply('- *[ ❌ ]* _Erro ao processar o anime_')
- }
- break
- case 'downloadanime2':
- try {//By: 𖧄 𝐋𝐔𝐂𝐀𝐒 𝐌𝐎𝐃 𝐃𝐎𝐌𝐈𝐍𝐀 𖧄
- //Canal: https://whatsapp.com/channel/0029Va6riekH5JLwLUFI7P2B
- if (!q) return reply('- *[ ‼ ]* _URL do vídeo não fornecida_')
- const [videoURL, animeTitleEnc, episodeEnc] = q.split('||')
- const animeTitle = decodeURIComponent(animeTitleEnc || 'Anime Desconhecido')
- const episode = decodeURIComponent(episodeEnc || 'EP Desconhecido')
- await zerotwo.sendMessage(from, { document: { url: `${zerosite}/api/anime/download?url=${encodeURIComponent(videoURL)}&apikey=${API_KEY_ZEROTWO}`}, fileName: `${animeTitle} - Episódio ${episode}.mp4`, mimetype: 'video/mp4', caption: `📥 *${animeTitle} - Episódio ${episode}*\n` +
- `✅ Download concluído com sucesso!`}, { quoted: info })
- } catch (e) {
- console.error('Erro no download:', e)
- reply('- *[ ❌ ]* _Falha no download, tente novamente_')
- }
- break
Advertisement
Add Comment
Please, Sign In to add comment