Created
February 4, 2021 16:00
-
-
Save phaticusthiccy/b080cee08267c52c7d090c4d1ca8e5d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Asena = require('../events'); | |
const {MessageType, MessageOptions, Mimetype} = require('@adiwajshing/baileys'); | |
const fs = require('fs'); | |
const axios = require('axios'); | |
const Language = require('../language'); | |
const Lang = Language.getString('ttp'); | |
Asena.addCommand({pattern: 'ttp ?(.*)', fromMe: true, desc: Lang.TTP_DESC}, (async (message, match) => { | |
if (match[1] === '') return await message.sendMessage(Lang.NEED_WORD); | |
var ttinullimage = await axios.get(`https://api.xteam.xyz/ttp?file&text=${match[1].replace(/Ö/g, "%C3%96").replace(/ö/g, "%C3%B6").replace(/ü/g, "%C3%BC").replace(/Ü/g, "%C3%9C").replace(/Ğ/g, "%C4%9E").replace(/ğ/g, "%C4%9F").replace(/ş/g, "%C5%9F").replace(/Ş/g, "%C5%9E").replace(/ç/g, "%C3%A7").replace(/Ç/g, "%C3%87").replace(/ı/g, "%C4%B1").replace(/i/g, "%69").replace(/"/g, "%22").replace(/İ/g, "%C4%B0")}`, { responseType: 'arraybuffer' }) | |
await message.sendMessage(Buffer(ttinullimage.data), MessageType.image, {mimetype: Mimetype.jpg, caption: 'Made by WhatsAsena'}) | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment