Skip to content

Instantly share code, notes, and snippets.

@nizamparkerz
Last active March 18, 2025 04:31
Show Gist options
  • Select an option

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

Select an option

Save nizamparkerz/825ec708fc715f06a07624db70ae80e5 to your computer and use it in GitHub Desktop.
Give it thatsall
const { Function,isPublic ,getJson } = require("../lib/");
Function({
pattern: 'hermit ?(.*)',
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/A-d-i-t-h-y-a-n/hermit-md'}},
{index: 1, urlButton: {displayText: 'Deploy ♐', url: 'https://baileys-md-qr.herokuapp.com/deployment'}},
{index: 1, urlButton: {displayText: 'Tutorial 🎥', url: 'https://youtu.be/X1gVE4t-HBo'}},
]
const templateMessage = {
image: {url: 'https://i.imgur.com/PXWGlpB.jpeg'},
caption: `${content}`,
footer: '© by nizam™',
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