💬 Object-oriented library for sending and receiving messages via Instagram! Based on instagram-private-api and made for the PronoteBot project.
Here is a simple chatbot made with the library:
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.authorID === client.user.id) return
message.markSeen();
if (message.content === '!ping') {
message.author.send('!pong');
}
});
client.on('messageDelete', (cachedMessage) => {
if (!cachedMessage) return;
console.log(`@${cachedMessage.author.username} has just deleted their message: ${cachedMessage.content}`);
});
client.login('username', 'password');
- Improve
User
andClientUser
classes by supporting all the properties sent by the API