-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
59 lines (47 loc) · 2.38 KB
/
main.js
File metadata and controls
59 lines (47 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Thankyou messages
let msgs = [
`msgs[options]♥`,
`Tysm♥`,
`Thank You♥`,
`Thank You💖`,
]
let options = Math.floor(Math.random() * msgs.length);
//whatsapp settings
const wa = require('@open-wa/wa-automate');
wa.create({
sessionId: "Birthday",
authTimeout: 60, //wait only 60 seconds to get a connection with the host account device
blockCrashLogs: true,
disableSpins: true,
headless: true,
hostNotificationLang: 'PT_BR',
logConsole: false,
popup: true,
qrTimeout: 0, //0 means it will wait forever for you to scan the qr code
}).then(client => start(client));
function start(client) {
client.onMessage(async message => {
if(message.body.toLowerCase().includes('birthday')) return client.sendText(message.from, msgs[options]);
if(message.body.toLowerCase().includes('bday')) return client.sendText(message.from, msgs[options]);
if(message.body.toLowerCase().includes('happy birthday')) return client.sendText(message.from, msgs[options]);
if(message.body.toLowerCase().includes('born day')) return client.sendText(message.from, msgs[options]);
if(message.body.toLowerCase().includes('bornday')) return client.sendText(message.from, msgs[options]);
if(message.body.toLowerCase().includes('birthday day')) return client.sendText(message.from, msgs[options]);
});
}
//instagram settings
const Insta = require('@androz2091/insta.js');
const client = new Insta.Client();
client.on('connected', () => {
console.log(`Logged in as ${client.user.username}`);
});
client.on('messageCreate', (message) => {
if (message.author.id === client.user.id) return
if(message.content.toLowerCase().includes('happy birthday')) return message.chat.sendMessage(msgs[options]);
if(message.content.toLowerCase().includes('birthday')) return message.chat.sendMessage(msgs[options]);
if(message.content.toLowerCase().includes('bday')) return message.chat.sendMessage(msgs[options]);
if(message.content.toLowerCase().includes('bornday')) return message.chat.sendMessage(msgs[options]);
if(message.content.toLowerCase().includes('born day')) return message.chat.sendMessage(msgs[options]);
if(message.content.toLowerCase().includes('birth day')) return message.chat.sendMessage(msgs[options]);
});
client.login('username', 'pass'); // enter the account info for which you wanna use the bot