(sock, message, args, context)
| 7 | groupOnly: true, |
| 8 | adminOnly: true, |
| 9 | async handler(sock, message, args, context) { |
| 10 | const { chatId, channelInfo } = context; |
| 11 | try { |
| 12 | const newCode = await sock.groupRevokeInvite(chatId); |
| 13 | await sock.sendMessage(chatId, { |
| 14 | text: `✅ Group link has been successfully reset\n\n🔗 New link:\nhttps://chat.whatsapp.com/${newCode}`, |
| 15 | ...channelInfo |
| 16 | }, { quoted: message }); |
| 17 | } |
| 18 | catch (error) { |
| 19 | console.error('Error in resetlink command:', error); |
| 20 | await sock.sendMessage(chatId, { |
| 21 | text: 'Failed to reset group link!', |
| 22 | ...channelInfo |
| 23 | }, { quoted: message }); |
| 24 | } |
| 25 | } |
| 26 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected