forked from SomnathDas/Whatsapp-Botto-Re
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnonPrefix.js
More file actions
21 lines (19 loc) · 773 Bytes
/
nonPrefix.js
File metadata and controls
21 lines (19 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module.exports = { msg }
async function msg(message, color, p, time) {
if (message.type == 'chat') {
const text = message.body.toLowerCase()
switch (true) {
case text.startsWith('an error'):
sclient.reply(message.from, 'Link!', message.id)
break
case text.startsWith('omae wa mou shindeiru'):
return sclient.reply(message.from, 'NANI!!', message.id)
break
/* eg case text.startsWith('your text'):
sclient.reply(message.from, 'response' message.id)
break*/
}
}
if (p) return console.log('[RECV]', color(time, 'yellow'), 'Message from', color(message.sender.pushname))
if (!p) return console.log('[RECV]', color(time, 'yellow'), 'Message from', color(message.sender.pushname), 'in', color(message.chat['name']))
}