(sock, message, args, context)
| 12 | usage: '.creact on/off', |
| 13 | ownerOnly: true, |
| 14 | async handler(sock, message, args, context) { |
| 15 | const { chatId, channelInfo } = context; |
| 16 | if (!args[0] || !['on', 'off'].includes(args[0])) { |
| 17 | await sock.sendMessage(chatId, { |
| 18 | text: `*Usage:*\n.creact on/off\n\nStorage: ${HAS_DB ? 'Database' : 'File System'}`, |
| 19 | ...channelInfo |
| 20 | }, { quoted: message }); |
| 21 | return; |
| 22 | } |
| 23 | if (args[0] === 'on') { |
| 24 | await setCommandReactState(true); |
| 25 | await sock.sendMessage(chatId, { |
| 26 | text: `*✅ Command reactions enabled*\n\nStorage: ${HAS_DB ? 'Database' : 'File System'}`, |
| 27 | ...channelInfo |
| 28 | }, { quoted: message }); |
| 29 | } |
| 30 | else if (args[0] === 'off') { |
| 31 | await setCommandReactState(false); |
| 32 | await sock.sendMessage(chatId, { |
| 33 | text: `*❌ Command reactions disabled*\n\nStorage: ${HAS_DB ? 'Database' : 'File System'}`, |
| 34 | ...channelInfo |
| 35 | }, { quoted: message }); |
| 36 | } |
| 37 | } |
| 38 | }; |
nothing calls this directly
no test coverage detected