Skip to content

Instantly share code, notes, and snippets.

@nizamparkerz
Last active June 15, 2022 14:45
Show Gist options
  • Select an option

  • Save nizamparkerz/cb78e1262952abab40d6e133f887eb97 to your computer and use it in GitHub Desktop.

Select an option

Save nizamparkerz/cb78e1262952abab40d6e133f887eb97 to your computer and use it in GitHub Desktop.
Enhance photo quality
const {
bot,
genButtonMessage,
mentionMessage,
enableMention,
clearFiles,
} = require('../lib/')
bot(
{
pattern: 'enhance ?(.*)',
fromMe: true,
dontAddCommandList: true,
desc: 'jail photo effect',
type: 'misc',
},async (message, match) => {
if (
!message.reply_message ||
(!message.reply_message.image && !message.reply_message.video)
)
return await message.sendMessage('*Reply to a image*',{quoted: message.data})
const url = await getUrl( await message.reply_message.downloadAndSaveMediaMessage())
const { buffer } = await getBuffer(`https://some-random-api.ml/canvas/jail?avatar=${url}`)
return await message.sendMessage(buffer,{ caption: ''},'image',{quoted: message.data })
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment