(sock, chatId)
| 70 | return Math.floor(Math.random() * 3000) + 2000; |
| 71 | } |
| 72 | async 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 | } |
| 82 | function extractUserInfo(message) { |
| 83 | const info = {}; |
| 84 | if (message.toLowerCase().includes('my name is')) { |
no test coverage detected