(sock: any, message: any, _args: any)
| 7 | ownerOnly: true, |
| 8 | |
| 9 | async handler(sock: any, message: any, _args: any) { |
| 10 | const chatId = message.key.remoteJid; |
| 11 | const commandHandler = (await import('../lib/commandHandler.js')).default; |
| 12 | |
| 13 | try { |
| 14 | const start = Date.now(); |
| 15 | commandHandler.reloadCommands(); |
| 16 | const end = Date.now(); |
| 17 | |
| 18 | await sock.sendMessage(chatId, { |
| 19 | text: `✅ Reloaded ${commandHandler.commands.size} commands in ${end - start}ms` |
| 20 | }); |
| 21 | } catch(error: any) { |
| 22 | await sock.sendMessage(chatId, { |
| 23 | text: `❌ Reload failed: ${error.message}` |
| 24 | }); |
| 25 | } |
| 26 | } |
| 27 | }; |
nothing calls this directly
no test coverage detected