Last active
July 3, 2024 17:30
-
-
Save techgod143/3330d0fe60022e3d16a5b7076a16ffcb to your computer and use it in GitHub Desktop.
A react LyFE
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 { bot, parsedJid, getRandom } = require('../lib/') | |
/* | |
bot( | |
{ pattern: 'areact ?(.*)', | |
fromMe: false, | |
desc: 'auto react to messages', | |
type: 'misc', | |
}, | |
async (message, match) => { | |
*/ | |
// add jid so bot not react to message of these chat | |
const not_react_jids = `` | |
// add jid so bot react to only to message of these chat | |
const react_jids = `` | |
const not_gids = parsedJid(not_react_jids) | |
const gids = parsedJid(react_jids) | |
// set true so only react in personal chat | |
const onlyPm = true | |
// set true so only react in group chat | |
const onlyGroup = false | |
const emojis = | |
'๐,๐,๐ฅฐ,๐,๐,๐ฅบ,๐คญ,๐ค,๐ถ,๐,๐ฅ,โ ๏ธ,โจ,๐,โญ,๐ซ,๐ฏ,๐ป,โค๏ธ,๐งก,๐,๐,๐,๐,๐,โค๏ธ,๐,๐ค,๐ค,๐ค,๐,๐,๐,๐,๐,๐,๐,โฅ๏ธ,โฃ๏ธ,๐,๐,๐,๐,๐๏ธ,๐,๐ฉโ๐ป,๐,๐,๐น,๐ฅ,๐บ,๐ท,๐ธ,๐ฎ,๐ต๏ธ,๐ป,โ๏ธ,๐,๐ฟ,๐ฑ,๐พ,๐,๐,๐,๐ผ,๐ด,๐ณ,๐ฒ,๐ต,๐,๐ฆ๏ธ,๐จ๏ธ,โ๏ธ,๐ค๏ธ,๐,๐ฅฆ,๐,๐,๐,๐ธ,๐ช,๐ป,๐ง,๐ญ,๐,๐ ,๐,๐,๐ฑ,๐,๐งฒ,๐,๐ก๏ธ,๐ฃ,๐,๐,๐ด,๐ก,๐ฅ,๐ง,โฆ๏ธ,โ,๐ต,๐ถ,๐,๐ฎ๐ณ'.split( | |
',' | |
) | |
bot({ on: 'text', fromMe: false, type: 'ar' }, async (message, match) => { | |
if (not_gids.length) { | |
if (not_gids.includes(message.jid)) return | |
} | |
if (gids.length) { | |
if (!gids.includes(message.jid)) return | |
} | |
const isReact = | |
!message.fromMe && | |
(onlyPm ? !message.isGroup : !onlyPm) && | |
(onlyGroup ? message.isGroup : !onlyGroup) | |
if (!isReact) return | |
const react = { | |
text: getRandom(emojis), | |
key: message.message.key, | |
} | |
return await message.send(react, {}, 'react') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment