MCPcopy Create free account
hub / github.com/GlobalTechInfo/MEGA-MDX / handler

Function handler

plugins/ping.ts:9–23  ·  view source on GitHub ↗
(sock: any, message: any, _args: any)

Source from the content-addressed store, hash-verified

7 isPrefixless: true,
8
9 async handler(sock: any, message: any, _args: any) {
10 const start = Date.now();
11 const chatId = message.key.remoteJid;
12
13 const sent = await sock.sendMessage(chatId, {
14 text: 'Pinging...'
15 });
16
17 const end = Date.now();
18
19 await sock.sendMessage(chatId, {
20 text: `🏓 Pong!\nLatency: ${end - start}ms`,
21 edit: sent.key
22 });
23 }
24};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected