(sock, message, _args)
| 6 | usage: '.ping', |
| 7 | isPrefixless: true, |
| 8 | async handler(sock, message, _args) { |
| 9 | const start = Date.now(); |
| 10 | const chatId = message.key.remoteJid; |
| 11 | const sent = await sock.sendMessage(chatId, { |
| 12 | text: 'Pinging...' |
| 13 | }); |
| 14 | const end = Date.now(); |
| 15 | await sock.sendMessage(chatId, { |
| 16 | text: `🏓 Pong!\nLatency: ${end - start}ms`, |
| 17 | edit: sent.key |
| 18 | }); |
| 19 | } |
| 20 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected