Last active
June 15, 2022 14:45
-
-
Save nizamparkerz/cb78e1262952abab40d6e133f887eb97 to your computer and use it in GitHub Desktop.
Enhance photo quality
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 { | |
| 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