-
Notifications
You must be signed in to change notification settings - Fork 202
/
Copy pathss.js
41 lines (27 loc) · 1.65 KB
/
ss.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* Codded by @phaticusthiccy & sanuwaofficial
*
Telegram: t.me/phaticusthiccy
*/
const Aqua = require('../events');
const {MessageType, MessageOptions, Mimetype} = require('@adiwajshing/baileys');
const fs = require('fs');
const axios = require('axios');
const request = require('request');
const got = require("got");
const Config = require('../config');
const Language = require('../language');
const Lang = Language.getString('webss');
if (Config.WORKTYPE == 'private') {
Aqua.addCommand({pattern: 'ss ?(.*)', fromMe: true, desc: Lang.SS_DESC}, (async (message, match) => {
if (match[1] === '') return await message.sendMessage(Lang.LİNK);
var webimage = await axios.get(`https://shot.screenshotapi.net/screenshot?&full_page=true&url=${match[1]}&fresh=true&output=image&file_type=png&dark_mode=true&wait_for_event=load&delay=2000`, { responseType: 'arraybuffer' })
await message.sendMessage(Buffer.from(webimage.data), MessageType.image, { mimetype: Mimetype.jpg, caption: Config.CAPTION, quoted: message.data })
}));
}
else if (Config.WORKTYPE == 'public') {
Aqua.addCommand({pattern: 'ss ?(.*)', fromMe: false, desc: Lang.SS_DESC}, (async (message, match) => {
if (match[1] === '') return await message.sendMessage(Lang.LİNK);
var webimage = await axios.get(`https://shot.screenshotapi.net/screenshot?&full_page=true&url=${match[1]}&fresh=true&output=image&file_type=png&dark_mode=true&wait_for_event=load&delay=2000`, { responseType: 'arraybuffer' })
await message.sendMessage(Buffer.from(webimage.data), MessageType.image, { mimetype: Mimetype.jpg, caption: Config.CAPTION, quoted: message.data })
}));
}