LucasMod

By: @lucas_mod_domina

Aug 16th, 2025 (edited)
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 10.86 KB | Source Code | 0 0
  1. // DEFINIÇÕES
  2. const zerosite = "https://zero-two-apis.com.br"
  3. const API_KEY_ZEROTWO = "SUA_KEY"
  4.  
  5. // 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!
  6.  
  7. /*
  8.  
  9. * 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.
  10.  
  11. * MY CONTACT: https://wa.me/559491569380
  12. * MY INSTAGRAM: https://instagram.com/lucas_mod_domina
  13.  
  14. */
  15.  
  16. // COMANDOS DA ANIME GAMES
  17. case 'animesgames':
  18. case 'animesgame':
  19. try {//By: 𖧄 𝐋𝐔𝐂𝐀𝐒 𝐌𝐎𝐃 𝐃𝐎𝐌𝐈𝐍𝐀 𖧄
  20. //Canal: https://whatsapp.com/channel/0029Va6riekH5JLwLUFI7P2B
  21. if(!q) return reply('- *[ ‼ ]* _Por favor digite o nome de alguma obra para efetuar a pesquisa_')
  22. let data = await fetchJson(`${zerosite}/api/search/anime?query=${encodeURIComponent(q)}&apikey=${API_KEY_ZEROTWO}`)
  23. if(!data.resultado || data.resultado.length < 1) return reply('- *[ 📴 ]* _Nenhum anime foi encontrado!_')
  24. const listMenu = {
  25. title: "📺 *Animes Encontrados*",
  26. sections: [{
  27. title: `🔍 Resultados para: ${q}`,
  28. rows: data.resultado.slice(0, 10000).map((anime, index) => ({
  29. id: `${prefixo}animedl ${anime.link}`,
  30. title: `[${anime.classificacao.trim()}] ${anime.anime}`,
  31. description: `📡 ${anime.total_ep} Episódios | ${anime.status}`
  32. }))
  33. }]
  34. }
  35. const thumbnail = data.resultado[0]?.imageUrl || logoslink.logo
  36. zerotwo.sendMessage(from, {image: { url: thumbnail }, caption: "⛩️ *Resultados da Pesquisa*", footer: "© " + nomedobot,
  37. buttons: [{
  38. buttonId: "anime_menu",
  39. buttonText: { displayText: "📺 Listar Animes" },
  40. type: 4,
  41. nativeFlowInfo: {
  42. name: "single_select",
  43. paramsJson: JSON.stringify(listMenu)
  44. }
  45. }],
  46. headerType: 1,
  47. viewOnce: true
  48. }, { quoted: info })
  49. } catch (e) {
  50. console.error('Erro no comando anime:', e)
  51. reply("- *[ ❌ ]* _Erro na busca de animes_")
  52. }
  53. break
  54.  
  55. case 'animedl':
  56. try {//By: 𖧄 𝐋𝐔𝐂𝐀𝐒 𝐌𝐎𝐃 𝐃𝐎𝐌𝐈𝐍𝐀 𖧄
  57. //Canal: https://whatsapp.com/channel/0029Va6riekH5JLwLUFI7P2B
  58. if(!q) return reply('- *[ ‼ ]* _Link do anime não fornecido_')
  59. let data = await fetchJson(`${zerosite}/api/detalhes/episodio/episode?url=${encodeURIComponent(q)}&apikey=${API_KEY_ZEROTWO}`)
  60. if (!data.status) return reply('- *[ ❌ ]* _Erro ao obter informações do anime_')
  61. const anime = data.resultado
  62. const classificacao = anime.classificacao?.trim() || 'Não informada'
  63. const generos = anime.generos?.join(', ') || 'Não informado'
  64. const infoAnime = `*🎬 ${anime.titulo}*\n\n` +
  65. `📌 *Tipo:* ${anime.tipo}\n` +
  66. `🗣️ *Linguagem:* ${anime.linguagem}\n` +
  67. `📅 *Status:* ${anime.status}\n` +
  68. `🎭 *Gêneros:* ${generos}\n` +
  69. `✍️ *Autor:* ${anime.autor || 'Não informado'}\n` +
  70. `🎬 *Diretor:* ${anime.diretor || 'Não informado'}\n` +
  71. `🏢 *Estúdio:* ${anime.estudio || 'Não informado'}\n` +
  72. `🎞️ *Total de Episódios:* ${anime.total_ep || 'Desconhecido'}\n` +
  73. `📀 *OVAs:* ${anime.ovas || '0'}\n` +
  74. `🔞 *Classificação:* ${classificacao}\n\n` +
  75. `📖 *Sinopse:* ${(anime.sinopse || '').replace('Sinopse', '')}`
  76. const listMenu = {
  77. title: "🎬 *Episódios Disponíveis*",
  78. sections: [{
  79. title: `📀 ${anime.titulo}`,
  80. rows: data.resultado.episodes.reverse().map(ep => ({
  81. id: `${prefixo}animeplay ${ep.link}`,
  82. title: ep.episodio,
  83. description: `📅 ${ep.lancamento || 'Data não disponível'}`
  84. })).slice(0, 10000)
  85. }]
  86. }
  87. const capaAnime = anime.imgUrl || logoslink.logo
  88. zerotwo.sendMessage(from, { image: { url: capaAnime }, caption: infoAnime, footer: "© " + nomedobot,
  89. buttons: [{
  90. buttonId: "episode_menu",
  91. buttonText: { displayText: "📥 Listar Episódios" },
  92. type: 4,
  93. nativeFlowInfo: {
  94. name: "single_select",
  95. paramsJson: JSON.stringify(listMenu)
  96. }
  97. }],
  98. headerType: 1,
  99. viewOnce: true
  100. }, { quoted: info })
  101. } catch (e) {
  102. console.error('Erro detalhado:', e)
  103. reply("- *[ ❌ ]* _Erro ao processar o link do anime_")
  104. }
  105. break
  106.  
  107. case 'animeplay':
  108. try {//By: 𖧄 𝐋𝐔𝐂𝐀𝐒 𝐌𝐎𝐃 𝐃𝐎𝐌𝐈𝐍𝐀 𖧄
  109. //Canal: https://whatsapp.com/channel/0029Va6riekH5JLwLUFI7P2B
  110. if(!q) return reply('- *[ ‼ ]* _Link do episódio não fornecido_')
  111. const episodeData = await fetchJson(`${zerosite}/api/dados/episodio/download-ep?url=${encodeURIComponent(q)}&apikey=${API_KEY_ZEROTWO}`)
  112. await zerotwo.relayMessage(from, {
  113. interactiveMessage: {
  114. header: proto.Message.InteractiveMessage.Header.create({
  115. ...(await prepareWAMessageMedia(
  116. { image: { url: episodeData.resultado.imageURL } },
  117. { upload: zerotwo.waUploadToServer }
  118. )),
  119. hasMediaAttachment: true
  120. }),
  121. body: {
  122. text: `*${episodeData.resultado.title}*\n\n` +
  123. `📀 Episódio: ${episodeData.resultado.episode}\n` +
  124. `🗓️ Lançamento: ${episodeData.resultado.releaseDate}\n` +
  125. `🔊 Áudio: ${episodeData.resultado.audio}`
  126. },
  127. footer: { text: "© " + nomedobot },
  128. nativeFlowMessage: {
  129. buttons: [{
  130. name: "quick_reply",
  131. buttonParamsJson: JSON.stringify({
  132. display_text: "⬇️ Baixar Agora",
  133. id: `${prefixo}downloadanime ${episodeData.resultado.videoURL}||${encodeURIComponent(episodeData.resultado.title)}||${encodeURIComponent(episodeData.resultado.episode)}`
  134. })
  135. }]
  136. }
  137. }
  138. }, {quoted: info})
  139. } catch(e) {
  140. console.error('Erro no animeplay:', e)
  141. reply('- *[ ❌ ]* _Erro ao carregar detalhes_')
  142. }
  143. break
  144.  
  145. case 'downloadanime':
  146. try {//By: 𖧄 𝐋𝐔𝐂𝐀𝐒 𝐌𝐎𝐃 𝐃𝐎𝐌𝐈𝐍𝐀 𖧄
  147. //Canal: https://whatsapp.com/channel/0029Va6riekH5JLwLUFI7P2B
  148. if (!q) return reply('- *[ ‼ ]* _URL do vídeo não fornecida_')
  149. const [videoURL, animeTitleEncoded, episodeNumberEncoded] = q.split('||')
  150. const animeTitle = decodeURIComponent(animeTitleEncoded || '')
  151. const episodeNumber = decodeURIComponent(episodeNumberEncoded || '')
  152. const videoResponse = await fetch(`${zerosite}/api/anime/baixar-video?url=${encodeURIComponent(videoURL)}&apikey=${API_KEY_ZEROTWO}`)
  153. if (!videoResponse.ok) {
  154. throw new Error(`Erro HTTP! status: ${videoResponse.status}`)
  155. }
  156. let chunks = []
  157. for await (const chunk of videoResponse.body) {
  158. chunks.push(chunk)
  159. }
  160. const videoBuffer = Buffer.concat(chunks)
  161. await zerotwo.sendMessage(from, { document: videoBuffer, fileName: `${animeTitle} - Episódio ${episodeNumber}.mp4`, mimetype: 'video/mp4', caption: '📥 *Download realizado com sucesso!*' }, { quoted: info })
  162. } catch (e) {
  163. console.error('Erro no download:', e)
  164. reply('- *[ ❌ ]* _Falha no download, tente novamente_')
  165. }
  166. break
  167.  
  168. // COMANDOS DA ANIMES ORIGINAL
  169. case 'animesdigital':
  170. try {//By: 𖧄 𝐋𝐔𝐂𝐀𝐒 𝐌𝐎𝐃 𝐃𝐎𝐌𝐈𝐍𝐀 𖧄
  171. //Canal: https://whatsapp.com/channel/0029Va6riekH5JLwLUFI7P2B
  172. if (!q) return reply('- *[ ‼ ]* _Digite o nome do anime que deseja pesquisar_')
  173. let searchData = await fetchJson(`${zerosite}/api/anime/search?query=${encodeURIComponent(q)}&apikey=${API_KEY_ZEROTWO}`)
  174. if (!searchData.status || !searchData.resultado?.length) return reply('- *[ ❌ ]* _Nenhum anime encontrado_')
  175. const listMenu = {
  176. title: "🔍 *Resultados da Pesquisa*",
  177. sections: [{
  178. title: `📚 Total: ${searchData.resultado.length} Animes`,
  179. rows: searchData.resultado.map(anime => ({
  180. id: `${prefixo}animedetails ${anime.link}`,
  181. title: anime.title,
  182. description: `🎬 ${anime.year} | ${anime.genres?.join(', ') || 'Sem gêneros'}`
  183. }))
  184. }]
  185. }
  186. const thumbnail = searchData.resultado[0]?.thumb || logoslink.logo
  187. zerotwo.sendMessage(from, {image: { url: thumbnail }, caption: "⛩️ *Resultados da Pesquisa*", footer: "© " + nomedobot,
  188. buttons: [{
  189. buttonId: "search_results",
  190. buttonText: { displayText: "📚 Listar Resultados" },
  191. type: 4,
  192. nativeFlowInfo: {
  193. name: "single_select",
  194. paramsJson: JSON.stringify(listMenu)
  195. }
  196. }],
  197. headerType: 1,
  198. viewOnce: true
  199. }, { quoted: info })
  200. } catch (e) {
  201. console.error('Erro na pesquisa:', e)
  202. reply('- *[ ❌ ]* _Erro na pesquisa_')
  203. }
  204. break
  205.  
  206. case 'animedetails':
  207. try {//By: 𖧄 𝐋𝐔𝐂𝐀𝐒 𝐌𝐎𝐃 𝐃𝐎𝐌𝐈𝐍𝐀 𖧄
  208. //Canal: https://whatsapp.com/channel/0029Va6riekH5JLwLUFI7P2B
  209. if (!q) return reply('- *[ ‼ ]* _Link do anime não fornecido_')
  210. let data = await fetchJson(`${zerosite}/api/getdetalhes/anime?url=${encodeURIComponent(q)}&apikey=${API_KEY_ZEROTWO}`)
  211. if (!data.status) return reply('- *[ ❌ ]* _Erro ao obter detalhes do anime_')
  212. const anime = data.resultado;
  213. const infoAnime = `*🎬 ${anime.title}*\n\n` +
  214. `📅 *Ano:* ${anime.year}\n` +
  215. `✍️ *Autor:* ${anime.author || 'Desconhecido'}\n` +
  216. `🎬 *Estúdio:* ${anime.studio || 'Desconhecido'}\n` +
  217. `🎞️ *Total de Episódios:* ${anime.total_ep}\n` +
  218. `🎭 *Gêneros:* ${anime.genres?.join(', ') || 'Não informado'}\n\n` +
  219. `📖 *Sinopse:* ${anime.sinopse || 'Sem sinopse'}`
  220. const listMenu = {
  221. title: "🎬 *Lista de Episódios*",
  222. sections: [{
  223. title: `📀 ${anime.title}`,
  224. rows: anime.episodes.map(ep => ({
  225. id: `${prefixo}downloadanime2 ${ep.animeDetails.videoUrl}||${encodeURIComponent(anime.title)}||${ep.animeDetails.episode}`,
  226. title: `Episódio ${ep.animeDetails.episode}`,
  227. description: `🗓️ ${ep.lancamento} | 🔊 ${ep.animeDetails.audio}`
  228. })).reverse().slice(0, 7000)
  229. }]
  230. }
  231. await zerotwo.sendMessage(from, {
  232. image: { url: anime.imgUrl },
  233. caption: infoAnime,
  234. footer: "© " + nomedobot,
  235. buttons: [{
  236. buttonId: "episode_list",
  237. buttonText: { displayText: "📥 Episódios Disponíveis" },
  238. type: 4,
  239. nativeFlowInfo: {
  240. name: "single_select",
  241. paramsJson: JSON.stringify(listMenu)
  242. }
  243. }],
  244. headerType: 1,
  245. viewOnce: true
  246. }, { quoted: info })
  247. } catch (e) {
  248. console.error('Erro nos detalhes:', e)
  249. reply('- *[ ❌ ]* _Erro ao processar o anime_')
  250. }
  251. break
  252.  
  253. case 'downloadanime2':
  254. try {//By: 𖧄 𝐋𝐔𝐂𝐀𝐒 𝐌𝐎𝐃 𝐃𝐎𝐌𝐈𝐍𝐀 𖧄
  255. //Canal: https://whatsapp.com/channel/0029Va6riekH5JLwLUFI7P2B
  256. if (!q) return reply('- *[ ‼ ]* _URL do vídeo não fornecida_')
  257. const [videoURL, animeTitleEnc, episodeEnc] = q.split('||')
  258. const animeTitle = decodeURIComponent(animeTitleEnc || 'Anime Desconhecido')
  259. const episode = decodeURIComponent(episodeEnc || 'EP Desconhecido')
  260. 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` +
  261.  `✅ Download concluído com sucesso!`}, { quoted: info })
  262. } catch (e) {
  263. console.error('Erro no download:', e)
  264. reply('- *[ ❌ ]* _Falha no download, tente novamente_')
  265. }
  266. break
Advertisement
Add Comment
Please, Sign In to add comment