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