Skip to content

Instantly share code, notes, and snippets.

@souravkl11
Last active May 4, 2024 07:15
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 53 You must be signed in to fork a gist
  • Save souravkl11/0091caf6c86eedae11c88cf98734707a to your computer and use it in GitHub Desktop.
Save souravkl11/0091caf6c86eedae11c88cf98734707a to your computer and use it in GitHub Desktop.
Sample plugin to send text, image & video
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')
});
@M3492
Copy link

M3492 commented Jul 30, 2022

@M3492
Copy link

M3492 commented Jul 30, 2022

@M3492
Copy link

M3492 commented Jul 30, 2022

💫

@M3492
Copy link

M3492 commented Jul 30, 2022

💢

@M3492
Copy link

M3492 commented Jul 30, 2022

💯

@M3492
Copy link

M3492 commented Jul 30, 2022

☹️

@M3492
Copy link

M3492 commented Jul 30, 2022

🌟

@M3492
Copy link

M3492 commented Jul 30, 2022

🔥

@bosco-ofc
Copy link

❤️❤️❤️❤️❤️

@Mybotmy999
Copy link

#``

@123subhi
Copy link

@123subhi
Copy link

@123subhi
Copy link

@123subhi
Copy link

@123subhi
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment