Last active
August 11, 2024 18:39
-
-
Save Cee-Jay-Err0r/e9d7b92fd6b2ba9fdac8d8df3f6b02f5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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