Skip to content

Instantly share code, notes, and snippets.

@Mrimperfect7
Forked from nizamparkerz/Hermit.js
Last active July 23, 2023 10:31
Show Gist options
  • Select an option

  • Save Mrimperfect7/bc9ecc86d54696a9d15d1910f1894ef5 to your computer and use it in GitHub Desktop.

Select an option

Save Mrimperfect7/bc9ecc86d54696a9d15d1910f1894ef5 to your computer and use it in GitHub Desktop.
Give it thatsall
const { Function,isPublic ,getJson } = require("../lib/");
Function({
pattern: 'hermit ?(.*)',
fromMe: isPublic,
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