IMPORTANT
You can reach the original version of this library from Insta.js, the difference of this library is to update and develop the library that Androz2091 has not developed anymore.
better-insta.js
Installation
npm i better-insta.js
Example
Here is a simple ping command made with the library:
const Insta = require("instagram.js");
const { username, password } = process.env;
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;
message.markSeen();
if (message.content === "!ping") {
message.channel.sendMessage("!pong");
}
});
client.login({ username, password });