MCPcopy Create free account
hub / github.com/GlobalTechInfo/MEGA-MD / showTyping

Function showTyping

plugins/chatbot.js:72–81  ·  view source on GitHub ↗
(sock, chatId)

Source from the content-addressed store, hash-verified

70 return Math.floor(Math.random() * 3000) + 2000;
71}
72async function showTyping(sock, chatId) {
73 try {
74 await sock.presenceSubscribe(chatId);
75 await sock.sendPresenceUpdate('composing', chatId);
76 await new Promise(resolve => setTimeout(resolve, getRandomDelay()));
77 }
78 catch (error) {
79 console.error('Typing indicator error:', error);
80 }
81}
82function extractUserInfo(message) {
83 const info = {};
84 if (message.toLowerCase().includes('my name is')) {

Callers 2

handleChatbotResponseFunction · 0.85
handlerFunction · 0.85

Calls 1

getRandomDelayFunction · 0.85

Tested by

no test coverage detected