-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.js
24 lines (22 loc) · 834 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const Insta = require('@androz2091/insta.js');
const { keep_alive } = require("./keep_alive");
const client = new Insta.Client();
const fetch = require("node-fetch");
//Made by Atreya YT
client.on('connected', () => {
console.log(`Logged in as ${client.user.username}`);
});
//Made by Atreya YT
client.on('messageCreate', (message) => {
if (message.author.id === client.user.id) return
message.markSeen();//Made by Atreya YT
fetch(`https://api.affiliateplus.xyz/api/chatbot?message=${encodeURIComponent(message.content)}&botname=${client.user.username}&ownername=Diwas Atreya`)
.then(res => res.json())
.then(json => {
if(!json.message) return;
return message.reply(json.message);
}).catch(err => {});
});
//Made by Atreya YT
client.login('instaID', 'instaPassword');
//Made by Atreya YT