Skip to content

Instantly share code, notes, and snippets.

@phaticusthiccy
Created February 4, 2021 16:00
Show Gist options
  • Save phaticusthiccy/b080cee08267c52c7d090c4d1ca8e5d0 to your computer and use it in GitHub Desktop.
Save phaticusthiccy/b080cee08267c52c7d090c4d1ca8e5d0 to your computer and use it in GitHub Desktop.
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