forked from cyberchekuthan/Amalser_v1
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRphlogo.js
36 lines (22 loc) · 1.43 KB
/
Rphlogo.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
/* # Exclusively from MsJessica
*/
const Asena = require('../events');
const { MessageType, MessageOptions, Mimetype } = require('@adiwajshing/baileys');
const fs = require('fs');
const axios = require('axios');
const Config = require('../config');
const need = "type some word after command\n🗡🗡"
if (Config.WORKTYPE == 'private') {
Asena.addCommand({ pattern: 'rphlogo ?(.*)', fromMe: true,dontAddCommandList: true }, (async (message, match) => {
if (match[1] === '') return await message.sendMessage(need);
var ttinullimage = await axios.get(`https://api.zeks.xyz/api/phlogo?apikey=cjxJIn9eDletRHac3CG6CdvGxFH&text1=${encodeURIComponent(match[1])}&text2=HUB`, { responseType: 'arraybuffer' })
await message.sendMessage(Buffer.from(ttinullimage.data), MessageType.image, { mimetype: Mimetype.jpg, caption: '*Made by Pinky*' })
}));
}
else if (Config.WORKTYPE == 'public') {
Asena.addCommand({ pattern: 'rphlogo ?(.*)', fromMe: false,dontAddCommandList: true}, (async (message, match) => {
if (match[1] === '') return await message.sendMessage(need);
var ttinullimage = await axios.get(`https://api.zeks.xyz/api/phlogo?apikey=cjxJIn9eDletRHac3CG6CdvGxFH&text1=${encodeURIComponent(match[1])}&text2=HUB`, { responseType: 'arraybuffer' })
await message.sendMessage(Buffer.from(ttinullimage.data), MessageType.image, { mimetype: Mimetype.jpg, caption: '*Made by Pinky*' })
}));
}