Skip to content

Instantly share code, notes, and snippets.

@Trenchkid123
Created September 30, 2023 19:44
Show Gist options
  • Select an option

  • Save Trenchkid123/80d70b67ded1e6290ae5854fdc276d7a to your computer and use it in GitHub Desktop.

Select an option

Save Trenchkid123/80d70b67ded1e6290ae5854fdc276d7a to your computer and use it in GitHub Desktop.
Awoo
const { bot, forwardOrBroadCast } = require('../lib')
// bot(
// {
// pattern: 'astatus ?(.*)',
// fromMe: true,
// desc: 'msg',
// type: 'whatsapp',
// },
// async (message, match) => {}
// )
const possibleReplies = 'send,snd,sent,snt,ayak,sd,st,ayakko,cent,cnt,cend'
bot({ on: 'text', fromMe: false, type: 'astatus' }, async (message, match) => {
if (
message.reply_message &&
message.reply_message.key.remoteJid == 'status@broadcast' &&
!message.isGroup
) {
for (const reply of possibleReplies.split(',')) {
if (new RegExp(reply, 'i').test(message.text)) {
return await forwardOrBroadCast(message.jid, message, {
quoted: message.data,
})
}
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment