MCPcopy Create free account
hub / github.com/Xchristech2/Zenitsu-Bot / addCommandReaction

Function addCommandReaction

lib/reactions.js:45–59  ·  view source on GitHub ↗
(sock, message)

Source from the content-addressed store, hash-verified

43
44// Function to add reaction to a command message
45async 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
62async function handleAreactCommand(sock, chatId, message, isOwner) {

Callers

nothing calls this directly

Calls 1

getRandomEmojiFunction · 0.85

Tested by

no test coverage detected