Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
API_KEY = '5VC9rvNx'
DATABASE_URL = ''
DATABASE_URL = 'postgres://exwynkwqnugluh:0ac861f8d626a83f880feb179edd419bdfa0fa0c35d18377acc02c7ac6c4d37c@ec2-44-199-22-207.compute-1.amazonaws.com:5432/d2pi7k7mufrp05'
4 changes: 2 additions & 2 deletions lib/y2mate.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function yt(url, quality, type, bitrate, server = 'en68') {
break
case 'mp3':
list = {
'128kbps': table.querySelector('td > a[href="#"]').parentElement.nextSibling.nextSibling.innerHTML
'320kbps': table.querySelector('td > a[href="#"]').parentElement.nextSibling.nextSibling.innerHTML
}
break
default:
Expand Down Expand Up @@ -92,7 +92,7 @@ module.exports = {
* @param {String} server (avaiable: `id4`, `en60`, `en61`, `en68`)
*/
yta(url, server = 'en406') {
return yt(url, '128kbps', 'mp3', '128', server)
return yt(url, '320kbps', 'mp3', '320', server)
},
/**
* Download YouTube Video as Video via y2mate
Expand Down
2 changes: 1 addition & 1 deletion plugins/download/apk.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ exports.run = {
}
},
error: false,
limit: true,
limit: false,
restrict: true,
}
2 changes: 1 addition & 1 deletion plugins/download/facebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports.run = {
}
},
error: false,
limit: true,
limit: false,
cache: true,
location: __filename
}
64 changes: 32 additions & 32 deletions plugins/download/igs.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
exports.run = {
usage: ['igs'],
hidden: ['igstory'],
use: 'username / link',
category: 'downloader',
async: async (m, {
client,
args,
isPrefix,
command
}) => {
try {
if (!args || !args[0]) return client.reply(m.chat, Func.example(isPrefix, command, 'hosico_cat'), m)
client.sendReact(m.chat, '🕒', m.key)
let old = new Date()
let json = await Api.igs(args[0])
if (!json.status) return client.reply(m.chat, global.status.fail, m)
for (let i = 0; i < json.data.length; i++) {
client.sendFile(m.chat, json.data[i].url, ``, `🍟 *Fetching* : ${((new Date - old) * 1)} ms (${i+1})`, m)
await Func.delay(1500)
}
await Func.delay(1500)
client.reply(m.chat, Func.texted('bold', `✅ Done, all stories successfully downloaded.`), m)
} catch (e) {
console.log(e)
return client.reply(m.chat, global.status.error, m)
}
},
error: false,
limit: true,
cache: true,
location: __filename
exports.run = {
usage: ['igs'],
hidden: ['igstory'],
use: 'username / link',
category: 'downloader',
async: async (m, {
client,
args,
isPrefix,
command
}) => {
try {
if (!args || !args[0]) return client.reply(m.chat, Func.example(isPrefix, command, 'hosico_cat'), m)
client.sendReact(m.chat, '🕒', m.key)
let old = new Date()
let json = await Api.igs(args[0])
if (!json.status) return client.reply(m.chat, global.status.fail, m)
for (let i = 0; i < json.data.length; i++) {
client.sendFile(m.chat, json.data[i].url, ``, `🍟 *Fetching* : ${((new Date - old) * 1)} ms (${i+1})`, m)
await Func.delay(1500)
}
await Func.delay(1500)
client.reply(m.chat, Func.texted('bold', `✅ Done, all stories successfully downloaded.`), m)
} catch (e) {
console.log(e)
return client.reply(m.chat, global.status.error, m)
}
},
error: false,
limit: false,
cache: true,
location: __filename
}
62 changes: 31 additions & 31 deletions plugins/download/instagram.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
exports.run = {
usage: ['ig'],
hidden: ['igdl'],
use: 'link',
category: 'downloader',
async: async (m, {
client,
args,
isPrefix,
command
}) => {
try {
if (!args || !args[0]) return client.reply(m.chat, Func.example(isPrefix, command, 'https://www.instagram.com/p/CK0tLXyAzEI'), m)
if (!args[0].match(/(https:\/\/www.instagram.com)/gi)) return client.reply(m.chat, global.status.invalid, m)
client.sendReact(m.chat, '🕒', m.key)
let old = new Date()
let json = await Api.ig(Func.igFixed(args[0]))
if (!json.status) return client.reply(m.chat, Func.jsonFormat(json), m)
json.data.map(async v => {
client.sendFile(m.chat, v.url, '', `🍟 *Fetching* : ${((new Date - old) * 1)} ms`, m)
await Func.delay(1500)
})
} catch (e) {
console.log(e)
return client.reply(m.chat, global.status.error, m)
}
},
error: false,
limit: true,
cache: true,
location: __filename
exports.run = {
usage: ['ig'],
hidden: ['igdl'],
use: 'link',
category: 'downloader',
async: async (m, {
client,
args,
isPrefix,
command
}) => {
try {
if (!args || !args[0]) return client.reply(m.chat, Func.example(isPrefix, command, 'https://www.instagram.com/p/CK0tLXyAzEI'), m)
if (!args[0].match(/(https:\/\/www.instagram.com)/gi)) return client.reply(m.chat, global.status.invalid, m)
client.sendReact(m.chat, '🕒', m.key)
let old = new Date()
let json = await Api.ig(Func.igFixed(args[0]))
if (!json.status) return client.reply(m.chat, Func.jsonFormat(json), m)
json.data.map(async v => {
client.sendFile(m.chat, v.url, '', `🍟 *Fetching* : ${((new Date - old) * 1)} ms`, m)
await Func.delay(1500)
})
} catch (e) {
console.log(e)
return client.reply(m.chat, global.status.error, m)
}
},
error: false,
limit: false,
cache: true,
location: __filename
}
82 changes: 41 additions & 41 deletions plugins/download/mediafire.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
const { decode } = require('html-entities')
exports.run = {
usage: ['mediafire'],
hidden: ['mf'],
use: 'link',
category: 'downloader',
async: async (m, {
client,
args,
isPrefix,
command
}) => {
try {
if (!args || !args[0]) return client.reply(m.chat, Func.example(isPrefix, command, 'https://www.mediafire.com/file/1fqjqg7e8e2v3ao/YOWA.v8.87_By.SamMods.apk/file'), m)
if (!args[0].match(/(https:\/\/www.mediafire.com\/)/gi)) return client.reply(m.chat, global.status.invalid, m)
client.sendReact(m.chat, '🕒', m.key)
let json = await Api.mediafire(args[0])
if (!json.status) return client.reply(m.chat, Func.jsonFormat(json), m)
let text = `乂 *M E D I A F I R E*\n\n`
text += ' ◦ *Name* : ' + unescape(decode(json.data.filename)) + '\n'
text += ' ◦ *Size* : ' + json.data.size + '\n'
text += ' ◦ *Extension* : ' + json.data.extension + '\n'
text += ' ◦ *Mime* : ' + json.data.mime + '\n'
text += ' ◦ *Uploaded* : ' + json.data.uploaded + '\n\n'
text += global.footer
let chSize = Func.sizeLimit(json.data.size, global.max_upload)
if (chSize.oversize) return client.reply(m.chat, `💀 File size (${json.data.size}) exceeds the maximum limit, download it by yourself via this link : ${await (await scrap.shorten(json.data.link)).data.url}`, m)
client.sendMessageModify(m.chat, text, m, {
largeThumb: true,
thumbnail: await Func.fetchBuffer('https://telegra.ph/file/fcf56d646aa059af84126.jpg')
}).then(async () => {
client.sendFile(m.chat, json.data.link, unescape(decode(json.data.filename)), '', m)
})
} catch {
return client.reply(m.chat, global.status.error, m)
}
},
error: false,
limit: true,
cache: true,
location: __filename
const { decode } = require('html-entities')
exports.run = {
usage: ['mediafire'],
hidden: ['mf'],
use: 'link',
category: 'downloader',
async: async (m, {
client,
args,
isPrefix,
command
}) => {
try {
if (!args || !args[0]) return client.reply(m.chat, Func.example(isPrefix, command, 'https://www.mediafire.com/file/1fqjqg7e8e2v3ao/YOWA.v8.87_By.SamMods.apk/file'), m)
if (!args[0].match(/(https:\/\/www.mediafire.com\/)/gi)) return client.reply(m.chat, global.status.invalid, m)
client.sendReact(m.chat, '🕒', m.key)
let json = await Api.mediafire(args[0])
if (!json.status) return client.reply(m.chat, Func.jsonFormat(json), m)
let text = `乂 *M E D I A F I R E*\n\n`
text += ' ◦ *Name* : ' + unescape(decode(json.data.filename)) + '\n'
text += ' ◦ *Size* : ' + json.data.size + '\n'
text += ' ◦ *Extension* : ' + json.data.extension + '\n'
text += ' ◦ *Mime* : ' + json.data.mime + '\n'
text += ' ◦ *Uploaded* : ' + json.data.uploaded + '\n\n'
text += global.footer
let chSize = Func.sizeLimit(json.data.size, global.max_upload)
if (chSize.oversize) return client.reply(m.chat, `💀 File size (${json.data.size}) exceeds the maximum limit, download it by yourself via this link : ${await (await scrap.shorten(json.data.link)).data.url}`, m)
client.sendMessageModify(m.chat, text, m, {
largeThumb: true,
thumbnail: await Func.fetchBuffer('https://telegra.ph/file/fcf56d646aa059af84126.jpg')
}).then(async () => {
client.sendFile(m.chat, json.data.link, unescape(decode(json.data.filename)), '', m)
})
} catch {
return client.reply(m.chat, global.status.error, m)
}
},
error: false,
limit: false,
cache: true,
location: __filename
}
58 changes: 29 additions & 29 deletions plugins/download/pin.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
exports.run = {
usage: ['pin'],
use: 'link',
category: 'downloader',
async: async (m, {
client,
args,
isPrefix,
command
}) => {
try {
if (!args || !args[0]) return client.reply(m.chat, Func.example(isPrefix, command, 'https://pin.it/5fXaAWE'), m)
if (!args[0].match(/pin(?:terest)?(?:\.it|\.com)/)) return client.reply(m.chat, global.status.invalid, m)
client.sendReact(m.chat, '🕒', m.key)
let old = new Date()
let json = await Api.pin(args[0])
if (!json.status) return client.reply(m.chat, Func.jsonFormat(json), m)
if (/jpg|mp4/.test(json.data.type)) return client.sendFile(m.chat, json.data.url, '', '', m)
if (json.data.type == 'gif') return client.sendFile(m.chat, json.data.url, '', `🍟 *Fetching* : ${((new Date - old) * 1)} ms`, m, {
gif: true
})
} catch {
return client.reply(m.chat, global.status.error, m)
}
},
error: false,
limit: true,
cache: true,
location: __filename
exports.run = {
usage: ['pin'],
use: 'link',
category: 'downloader',
async: async (m, {
client,
args,
isPrefix,
command
}) => {
try {
if (!args || !args[0]) return client.reply(m.chat, Func.example(isPrefix, command, 'https://pin.it/5fXaAWE'), m)
if (!args[0].match(/pin(?:terest)?(?:\.it|\.com)/)) return client.reply(m.chat, global.status.invalid, m)
client.sendReact(m.chat, '🕒', m.key)
let old = new Date()
let json = await Api.pin(args[0])
if (!json.status) return client.reply(m.chat, Func.jsonFormat(json), m)
if (/jpg|mp4/.test(json.data.type)) return client.sendFile(m.chat, json.data.url, '', '', m)
if (json.data.type == 'gif') return client.sendFile(m.chat, json.data.url, '', `🍟 *Fetching* : ${((new Date - old) * 1)} ms`, m, {
gif: true
})
} catch {
return client.reply(m.chat, global.status.error, m)
}
},
error: false,
limit: false,
cache: true,
location: __filename
}
Loading