Advertisement
Newbie4rt-ID

Untitled

Jul 28th, 2022
864
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. case  'ig': case 'igdl': case 'instagram': {
  2. if(!q) return setReply("Link ig nya mana kak")
  3. if (!args[0].includes('instagram.com')) return setReply(`Maaf kak link salah! perintah ini untuk mengunduh postingan instagram`)            
  4. let urlnya = q
  5. hx.igdl(urlnya)
  6. .then(async(result) => {     
  7. var halo = 0   
  8. setReply(mess.wait)
  9. xdev.sendMessage(m.chat, { image: { url: result.user.profilePicUrl }, jpegThumbnail: await getBuffer(result.user.profilePicUrl), caption: `「 INSTAGRAM DOWNLOADER 」\n\n⭔ *Nickname :* ${result.user.fullName}\n⭔ *Followers :* ${result.user.followers}\n⭔ *ID :* ${result.user.id}\n⭔ *Filetype :* ${result.medias[0].fileType}\n⭔ *Jumlah Media :* ${result.medias.length}\n⭔ *Url :* ${q}\n` }, { quoted: dev })                                                                        
  10. for(let i of result.medias) {      
  11. if(i.url.includes('mp4')){                                             
  12. let link = await getBuffer(i.url)
  13. xdev.sendMessage(m.chat, { video: link, jpegThumbnail: await getBuffer(i.preview), caption: `Nih kak hasil ${i.type} instagram` }, { quoted: dev })
  14. } else {
  15. let link = await getBuffer(i.url)
  16. xdev.sendMessage(m.chat, { image: link, jpegThumbnail: await getBuffer(i.preview), caption: `Nih kak hasil ${i.type} instagram` }, { quoted: dev })                      
  17. }
  18. }
  19. }).catch((err) => {
  20. console.log(error);
  21. }  
  22. )
  23. };
  24. break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement