Created
January 11, 2023 05:47
-
-
Save ishkumarr/2565e8b8c297add86d83e8604f2b3505 to your computer and use it in GitHub Desktop.
This file contains 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 { Function,isPublic ,getJson } = require("../lib/"); | |
Function({ | |
pattern: 'arin ?(.*)', | |
fromMe: false, | |
desc: 'Sends template button image', | |
type: 'misc', | |
}, async (message, match) => { | |
const { content } = await getJson ('https://www.quotable.io/random') | |
const templateButtons = [ | |
{index: 1, urlButton: {displayText: 'Github ♻️', url: 'https://github.com/arinsharma1979'}}, | |
{index: 1, urlButton: {displayText: 'Instagram 📸', url: 'https://instagram.com/arinnsharma'}}, | |
{index: 1, urlButton: {displayText: 'Take me to your ❤️', url: 'https://youtu.be/eYuUAGXN0KM'}}, | |
] | |
const templateMessage = { | |
image: {url: 'https://imgur.io/09HzSRs?r.jpeg'}, | |
caption: `${content}`, | |
footer: 'by Arin', | |
templateButtons: templateButtons | |
} | |
await message.client.sendMessage(message.chat, templateMessage) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment