Skip to content

Instantly share code, notes, and snippets.

@INR-L
Last active March 7, 2023 11:51
Show Gist options
  • Save INR-L/53807049f8ca99f0275dc740a14b828b to your computer and use it in GitHub Desktop.
Save INR-L/53807049f8ca99f0275dc740a14b828b to your computer and use it in GitHub Desktop.
const { inrl , tiny, config, inrlQuita, insult , getBuffer, randomStyle, styletext, send_alive, send_menu } = require('../lib/')
const Config = require("../config");
const {getVar}=require('../lib/database/variable');
const got = require('got');
inrl(
{
pattern: ['insta'],
desc: 'To viwe list of categories',
sucReact: "💯",
category: ["system", "all"],
type :'info'
},
async (message, client, match) => {
match = match?.trim()||message?.quoted?.text?.trim();
if(!match) return await message.reply('ned url');
let url = `https://ssyoutube-api.sansekai.repl.co/api/instagram?url=${match.trim()}`;
let {body} = await got(url);
body = JSON.parse(body);
if(body.status == 'false') return message.reply('not found error');
let type = body.result.url[0].ext == 'mp4' ? 'video':'image',
media = body.result.url[0].url;
let data = await getVar();
let {CAPTION}=data.data[0];
return await client.sendMessage(message.from, {[type]:{url:media}, caption:CAPTION});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment