Skip to content

Instantly share code, notes, and snippets.

@missnora07
Last active March 2, 2023 12:48
Show Gist options
  • Save missnora07/584aa848b5cc3cf1419454cdc5b18808 to your computer and use it in GitHub Desktop.
Save missnora07/584aa848b5cc3cf1419454cdc5b18808 to your computer and use it in GitHub Desktop.
const {Module} = require('../main')
const {skbuffer} = require('raganork-bot');
Module({pattern: 'xtag ?(.*)',fromMe: true,desc: 'Tag to jid', use: 'utility',}, async (m, match) => {
if (!match[1]) return await m.sendMessage("*Give me a jid*\nExample .xtag jid");
if (!m.reply_message) return await m.sendMessage("*Reply to a Message*");
let Jids = [...match[1].match(/[0-9]+(-[0-9]+|)(@g.us|@s.whatsapp.net)/g)]
for (let jid of Jids) {
await m.forwardMessage(jid,m.quoted,{contextInfo :{mentionedJid: (await m.client.groupMetadata(jid)).participants.map(i=>i.id),isForwarded:false}});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment