Skip to content

Instantly share code, notes, and snippets.

@phaticusthiccy
Created January 24, 2021 22:19
Show Gist options
  • Select an option

  • Save phaticusthiccy/0ebca856ae11fe8f191e913fe803b3d7 to your computer and use it in GitHub Desktop.

Select an option

Save phaticusthiccy/0ebca856ae11fe8f191e913fe803b3d7 to your computer and use it in GitHub Desktop.
/* Codded by @phaticusthiccy
Telegram: t.me/phaticusthiccy
Instagram: www.instagram.com/kyrie.baran
*/
const Asena = require('../events');
const {MessageType, MessageOptions, Mimetype} = require('@adiwajshing/baileys');
const axios = require('axios');
Asena.addCommand({pattern: 'carbon ?(.*)', fromMe: true}, (async (message, match) => {
if (match[1] === '') return await message.sendMessage('Need Word!');
var respoimage = await axios.get(`https://carbonnowsh.herokuapp.com/?code=${match[1]}&theme=darcula`, { responseType: 'arraybuffer' })
await message.sendMessage(Buffer(respoimage.data), MessageType.image, {mimetype: Mimetype.png})
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment