const{ command ,isPrivate}=require("../lib/");//importing functions command({pattern: "ping",//commandfromMe: isPrivate,/*need to respond for everyone's messagetrue : only from sudo numbersfalse : from everyoneisPrivate same as false but will be considered as true if worktype is private*/desc: "To check ping",//description of the commandtype: "user",//command type },async(message,match)=>{/*PLUGIN CONTENT HERE*/});
Sending Messages
Replying
message.reply('Hi')
Media
letcontent='https://wallpaperaccess.com/full/5531321.jpg'//can also use buffermessage.sendMessage(content,{}/*options*/,'image'/*change to audio , video while sending audio or video */)
Sticker
message.sendMessage('url or buffer of image or video(max 10 seconds)',{packname: config.PACKNAME,author: config.AUTHOR},"sticker");
Template Message
consttemplateButtons=[{index: 1,urlButton: {displayText: '⭐ Star Baileys on GitHub!',url: 'https://github.com/adiwajshing/Baileys'}},{index: 2,quickReplyButton: {displayText: 'This is a reply, just like normal buttons!',id: 'id-like-buttons-message'}},]consttemplateMessage={text: "Hi it's a template message",footer: 'Hello World',templateButtons: templateButtons}awaitmessage.sendMessage(templateMessage,{},"template");