-
-
Save souravkl11/0091caf6c86eedae11c88cf98734707a to your computer and use it in GitHub Desktop.
Sample plugin to send text, image & video
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 {Module} = require('../main') | |
const {skbuffer} = require('raganork-bot'); | |
const {MODE} = require('../config'); | |
let auto = MODE == 'public' ? false : true | |
//================================================ | |
// TEXT SENDER SAMPLE 👇 | |
// =============================================== | |
Module({ | |
pattern: 'text ?(.*)', | |
fromMe: auto, | |
desc: 'Sends text', | |
use: 'utility', | |
}, async (m,t) => { | |
await m.sendReply("*TEXT HERE*") | |
}); | |
//================================================ | |
// IMAGE SENDER SAMPLE 👇 | |
// =============================================== | |
Module({ | |
pattern: 'image ?(.*)', | |
fromMe: auto, | |
desc: 'Sends image', | |
use: 'utility', | |
}, async (m,t) => { | |
await m.client.sendMessage(m.jid,{image:{url: 'https://i.imgur.com/c3brJQR.jpeg'}, caption: "YOUR CAPTION HERE"},'image') | |
}); | |
//================================================ | |
// VIDEO SENDER SAMPLE 👇 | |
// =============================================== | |
Module({ | |
pattern: 'video ?(.*)', | |
fromMe: auto, | |
desc: 'Sends video', | |
use: 'utility', | |
}, async (m,t) => { | |
await m.client.sendMessage(m.jid,{image:{url: 'https://i.imgur.com/c3brJQR.jpeg'}, caption: "YOUR CAPTION HERE"},'video') | |
}); |
💢
💯
🌟
🔥
❤️❤️❤️❤️❤️
#``
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
💫