(sock, message)
| 43 | |
| 44 | // Function to add reaction to a command message |
| 45 | async function addCommandReaction(sock, message) { |
| 46 | try { |
| 47 | if (!isAutoReactionEnabled || !message?.key?.id) return; |
| 48 | |
| 49 | const emoji = getRandomEmoji(); |
| 50 | await sock.sendMessage(message.key.remoteJid, { |
| 51 | react: { |
| 52 | text: emoji, |
| 53 | key: message.key |
| 54 | } |
| 55 | }); |
| 56 | } catch (error) { |
| 57 | console.error('Error adding command reaction:', error); |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | // Function to handle areact command |
| 62 | async function handleAreactCommand(sock, chatId, message, isOwner) { |
nothing calls this directly
no test coverage detected