Skip to content

Instantly share code, notes, and snippets.

@SuhailTechInfo
Last active September 17, 2024 07:13
Show Gist options
  • Save SuhailTechInfo/330f134929c6352bbc44c41896201651 to your computer and use it in GitHub Desktop.
Save SuhailTechInfo/330f134929c6352bbc44c41896201651 to your computer and use it in GitHub Desktop.
[Suhail Plugins] Download terabox post!
/**
//═══════════════════════════════════════════════════════════════════════════//
// WHATSAPP BOT-MD BETA //
// ███████╗██╗ ██╗██╗ ██╗ █████╗ ██╗██╗ ███╗ ███╗██████╗ //
// ██╔════╝██║ ██║██║ ██║██╔══██╗██║██║ ████╗ ████║██╔══██╗ //
// ███████╗██║ ██║███████║███████║██║██║ ██╔████╔██║██║ ██║ //
// ╚════██║██║ ██║██╔══██║██╔══██║██║██║ ██║╚██╔╝██║██║ ██║ //
// ███████║╚██████╔╝██║ ██║██║ ██║██║███████╗ ██║ ╚═╝ ██║██████╔╝ //
// ╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚══════╝ ╚═╝ ╚═╝╚═════╝ //
//═══════════════════════════════════════════════════════════════════════════//
CURRENTLY RUNNING ON BETA VERSION!!
*
* @project_name : Suhail-Md
* @author : Suhail Tech Info
* @youtube : https://www.youtube.com/@SuhailTechInfo
* @whatsapp : https://wa.me/923184474176
* @description : Suhail-Md ,A Multi-functional whatsapp user bot.
* @version 1.3.9
*
* Licensed under the GPL-3.0 License;
* © 2024 Suhail-Md.
* 27 June 2024
**/
let {smd , smdJson } = require(lib_dir)
// api_smd = "https://api-smd.onrender.com"
// test_url = "https://terabox.com/s/1UQtc6Gz9EHQZPvYJARU7cw"
/*
cmd({
pattern :"terabox",
desc: "downloads terabox messages",
category: "download",
use:"< url >",
filename: __filename,
}
*/
let tbcmd = {
cmdname:"terabox",
alias:["tbdl","teradl"],
type:"downloader",
filename:__filename,
creator:"Suhail",
use:"[!url]",
info:"download terabox video/image/post!",
function : async (m,text,{smd}) =>{
try{
let teraurl = text.split(" ")[0*0].trim()
if(!text || !/http/gi.test(teraurl) ) return await m.reply("_Please provide terabox url!_")
// force=true
await m.react('⏳')
let data = await smdJson(`${api_smd}/api/terabox?url=${teraurl}`) || {}
let tera = data.response
if (!data || !tera || !tera[0]) {
await m.send(`*_${(data.message || `Terabox data not found!`).trim() }_*`)
}else {
for (let i=0;i<tera.length;i++) {
try{
if(!tera[i].resolutions) continue
let tpost = tera[i].resolutions
await m.bot.sendFileUrl(m.chat, tpost['Fast Download'], tpost.title, m,{},"video");
}catch(e){ console.log(e) }
}
}
await m.sendMessage(m.jid,{react:{text:'',key:m.key,},})
}catch(e){await m.error(`${e}\n\ncommand: tera`,e,"*_Error sending terabox post!!!_*")}
}
}
smd(tbcmd,tbcmd.function)
@AKASH007676
Copy link

Do not work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment