arabdullah's picture
sjwwehfiuwia
290c0c4 verified
import config from '../../config.cjs';
const ping = async (m, sock) => {
const prefix = config.PREFIX;
const cmd = m.body.startsWith(prefix) ? m.body.slice(prefix.length).split(' ')[0].toLowerCase() : '';
const text = m.body.slice(prefix.length + cmd.length).trim();
if (cmd === "ping") {
const start = new Date().getTime();
await m.React('โšก');
const end = new Date().getTime();
const responseTime = (end - start) / 1000;
const text = `*_๐Ÿ”ฅโƒะฒฯƒั‚ ั•ฯั”ั”โˆ‚: ${responseTime.toFixed(2)} s_*`;
sock.sendMessage(m.from, { text }, { quoted: m });
}
}
export default ping;