Skip to content

Instantly share code, notes, and snippets.

@ishkumarr
Last active January 24, 2023 06:23
Show Gist options
  • Save ishkumarr/cdac140c4b2d45b3bbbc0fbefeae8c75 to your computer and use it in GitHub Desktop.
Save ishkumarr/cdac140c4b2d45b3bbbc0fbefeae8c75 to your computer and use it in GitHub Desktop.
const {
Function,
isPublic
} = require('../lib/')
Function({
pattern: 'usa ?(.*)',
fromMe: isPublic,
desc: 'VFx Services',
type: 'vfx',
}, async (message, match) => {
const templateButtons = [
{index: 1, urlButton: {displayText: 'Instagram', url: 'instagram.com/arinnsharma'}},
{index: 2, callButton: {displayText: 'Call us!', phoneNumber: '+1 800-284-3226'}},
{index: 3, quickReplyButton: {displayText: 'Visit Rebel Monkey', url: 'rebelmonkeyproduction.com'}},
]
const templateMessage = {
video: {url: 'https://imgur.com/a/ZfUVY6Q'},
caption: "Hey, as per your whatsapp registered number, you are not from USA regiom. Unfortunately the online services are not operational in your region.",
footer: 'VDJ 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