androz2091 / insta.js Goto Github PK
View Code? Open in Web Editor NEW💬 Object-oriented library for sending and receiving messages via Instagram
💬 Object-oriented library for sending and receiving messages via Instagram
const collector = message.createMessageCollector({
filter: (m) => m.content === "10",
idle: 10000
})
collector.on(`end`, (reason) => {
console.log(reason)
if (reason === `idle`) {
return message.chat.sendMessage(`Sorry, the game is over and no one found the right number: 10`)
}
})
This code spams "Sorry, the game is over and no one found the right number: 10"
Detect private message requests, be able to accept them and retrieve the message content to emit the messageCreate event afterwards.
author: data.story_share?.message === 'No longer available' ? null : this.client._patchOrCreateUser(data.story_share.media?.user.pk, data.story_share?.media?.user),
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:1053:16)
at Module._compile (internal/modules/cjs/loader.js:1101:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/container/node_modules/@androz2091/insta.js/src/structures/Chat.js:2:17)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)```
When trying to log in the client with the basic example I get a IgResponseError
thrown by line 370 in Client.js. This is most likely connected to this issues in the instagram-private-api
.
(node:17054) UnhandledPromiseRejectionWarning: IgResponseError: GET /api/v1/direct_v2/inbox/?visual_message_return_type=unseen&thread_message_limit=10&persistentBadging=true&limit=20 - 560 -;
at Request.handleResponseError (/home/dcts/code/insta.js/node_modules/instagram-private-api/dist/core/request.js:125:16)
at Request.send (/home/dcts/code/insta.js/node_modules/instagram-private-api/dist/core/request.js:53:28)
at async DirectInboxFeed.request (/home/dcts/code/insta.js/node_modules/instagram-private-api/dist/feeds/direct-inbox.feed.js:21:26)
at async Client.login (/home/dcts/code/insta.js/src/structures/Client.js:385:23)
(node:17054) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:17054) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Yesterday there was another error caused by ig.realtime.connect()
, but this one occures even before that. So basically there are 2 errors currently:
As I see it, these errors are caused by the original repos dilame/instagram-private-api and Nerixyz/instagram_mqtt and can only be fixed by debugging the errors inside these repositories.
A createMessageCollector function and a createLikeCollector function (for messages).
AFAIK insta.js doesn't support voice messages and pictures (instant and always-sent).
Implementing this would be great IMO.
Function to retrieve a user using their nickname or id.
The bot disconnects from Instagram from time to time, and that is breaking events (such as message received).
But, user-triggered events (such as sending messages) are still working fine.
(Duplicate of an issue that I reported on the Discord server, Androz said that this was probably due to the private API that the library uses)
The likeAdd emits a messageCreate event.
I don't know/understand but it happens sometimes, i mean
(after a reboot) > i like the newest message > get the log
i like an older message >the messageCreate event is emitted
How To Send Message To Specific Username ?
where code example
you need 3 accounts to test this:
post a story with account 3. Log in to account 2 and share that private story with the bot account by DM. Try to run Client.login()
. This will throw the error:
(node:22369) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'user' of undefined
at new Message (/home/dcts/code/insta.js/src/structures/Message.js:80:83)
at /home/dcts/code/insta.js/src/structures/Chat.js:76:49
at Array.forEach (<anonymous>)
at Chat._patch (/home/dcts/code/insta.js/src/structures/Chat.js:75:24)
at new Chat (/home/dcts/code/insta.js/src/structures/Chat.js:53:14)
at /home/dcts/code/insta.js/src/structures/Client.js:374:26
at Array.forEach (<anonymous>)
at Client.login (/home/dcts/code/insta.js/src/structures/Client.js:373:17)
This error is caused because the case of a hidden story share is not catched. I added a pull request that fixes this issue by catching unavailible stories before initializing the message object.
For me the repo somehow stopped working. I have multiple bots running and all of them consistently show the following error when trying to log in:
(node:27822) UnhandledPromiseRejectionWarning: ConnectionFailedError: CONNACK returnCode: 3 errorName: Server unavailable
at Object.next (/home/dcts/code/insta.js/node_modules/instagram_mqtt/dist/mqttot/mqttot.client.js:72:23)
at MQTToTClient.continueFlows (/home/dcts/code/insta.js/node_modules/mqtts/dist/mqtt.client.js:212:104)
at MQTToTClient.handlePacket (/home/dcts/code/insta.js/node_modules/mqtts/dist/mqtt.client.js:291:19)
at /home/dcts/code/insta.js/node_modules/mqtts/dist/mqtt.client.js:247:43
at Array.forEach (<anonymous>)
at MQTToTClient.parseData (/home/dcts/code/insta.js/node_modules/mqtts/dist/mqtt.client.js:247:25)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:27822) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:27822) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Anyone having the same issue?
I investigated a bit and the piece of code inside the client class that causes the error is this one
(node:4) UnhandledPromiseRejectionWarning: IgResponseError: POST /api/v1/accounts/msisdn_header_bootstrap/ - 302 Found;
I got this error and i dunno how to fix it. Can someone help me?
Missing property:
Improvement:
Things that summons errors:
Feature ideas:
Maybe i will edit it if i have new suggestions.
i want to get media from a user, if he posted new story / post
looks like
client.on('storyUpdate', (data) => { console.log(data) // here can be stories / post links, or metadata });
(node:40) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'user' of undefined
User.followers() is limited to 100 people. is it possible to have all followers?
Hi all,
Are there any examples of sessions I can use like this?
client.on('pendingRequest', (chat) => {
chat.approve();
});
🥺🥺🥺
• détecter les demandes de messages privé, pouvoir les accepter et récupérer l'objet message pour emit l'event messageCreate
• une fonction createMessageCollector et une fonction createLikeCollector
• Envoi des photos
• Possibilité de supprimer un message
• Abonnement / désabonnement
• Détecter les likes sur les messages et en poster
• Marquer les messages comme lu
On the messageCreate event, with the message parameter. When the User receives a message containing an URL, message.content returns undefined
Insta.js is causing problem while using the bot
it's an package error please fix it
Add this please
When I recreate the basic example, I receive a ClientDisconnectedError
. This happens almost every time I send a message, but also approximately every 20 seconds (even when not sending a message). But the messages still get propagated and I can display them locally, which is great. But I am wondering what causes the error, it seems risky to me just ignoring this error. Heres the full error:
ClientDisconnectedError: MQTToTClient got disconnected.
at SafeSubscriber._next (/home/instjstest/node_modules/instagram_mqtt/dist/realtime/realtime.client.js:154:30)
at SafeSubscriber.__tryOrUnsub (/home/instjstest/node_modules/mqtts/node_modules/rxjs/internal/Subscriber.js:205:16)
at SafeSubscriber.next (/home/instjstest/node_modules/mqtts/node_modules/rxjs/internal/Subscriber.js:143:22)
at Subscriber._next (/home/instjstest/node_modules/mqtts/node_modules/rxjs/internal/Subscriber.js:89:26)
at Subscriber.next (/home/instjstest/node_modules/mqtts/node_modules/rxjs/internal/Subscriber.js:66:18)
at Subject.next (/home/instjstest/node_modules/mqtts/node_modules/rxjs/internal/Subject.js:60:25)
at MQTToTClient.setDisconnected (/home/instjstest/node_modules/mqtts/dist/mqtt.client.js:330:30)
at Object.disconnect (/home/instjstest/node_modules/mqtts/dist/mqtt.client.js:98:26)
at TLSSocket.<anonymous> (/home/instjstest/node_modules/mqtts/dist/transport/tls.transport.js:36:52)
at TLSSocket.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1220:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
What could cause this error?
Idk if this is a limitation of Instagram API or we don't update it but when I send a video it all returns type raven_mdeia
but no URLs to get it.
Message Object
{
id: '<removed>',
chatID: '<removed>',
type: 'raven_media',
timestamp: 1625868234651957,
authorID: '<removed>' ,
storyShareData: undefined,
mediaData: undefined,
voiceData: undefined,
likes: []
}
Publish publications with a description... directly with the package :)
Hello.
I always get these errors after client.logout()
:
ClientDisconnectedError: MQTToTClient got disconnected. at SafeSubscriber._next (C:\PROJ\IG\node_modules\instagram_mqtt\dist\realtime\realtime.client.js:154:30) at SafeSubscriber.__tryOrUnsub (C:\PROJ\IG\node_modules\rxjs\internal\Subscriber.js:205:16) at SafeSubscriber.next (C:\PROJ\IG\node_modules\rxjs\internal\Subscriber.js:143:22) at Subscriber._next (C:\PROJ\IG\node_modules\rxjs\internal\Subscriber.js:89:26) at Subscriber.next (C:\PROJ\IG\node_modules\rxjs\internal\Subscriber.js:66:18) at Subject.next (C:\PROJ\IG\node_modules\rxjs\internal\Subject.js:60:25) at MQTToTClient.setDisconnected (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:330:30) at Object.disconnect (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:98:26) at TLSSocket.<anonymous> (C:\PROJ\IG\node_modules\mqtts\dist\transport\tls.transport.js:36:52) at TLSSocket.emit (events.js:327:22) at endReadableNT (internal/streams/readable.js:1327:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)
IgCookieNotFoundError: Cookie "sessionid" not found at State.extractCookieValue (C:\PROJ\IG\node_modules\instagram-private-api\dist\core\state.js:142:19) at RealtimeClient.constructConnection (C:\PROJ\IG\node_modules\instagram_mqtt\dist\realtime\realtime.client.js:42:53) at MQTToTClient.payloadProvider [as connectPayloadProvider] (C:\PROJ\IG\node_modules\instagram_mqtt\dist\realtime\realtime.client.js: 92:22) at MQTToTClient.connect (C:\PROJ\IG\node_modules\instagram_mqtt\dist\mqttot\mqttot.client.js:38:42) at MQTToTClient.setDisconnected (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:339:18) at Object.disconnect (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:98:26) at TLSSocket.<anonymous> (C:\PROJ\IG\node_modules\mqtts\dist\transport\tls.transport.js:36:52) at TLSSocket.emit (events.js:327:22) at endReadableNT (internal/streams/readable.js:1327:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)
And if I try to log in again WITHOUT RESTARTING the server, I will get this error:
ConnectionFailedError: CONNACK returnCode: 2 errorName: Identifier rejected at Object.next (C:\PROJ\IG\node_modules\instagram_mqtt\dist\mqttot\mqttot.client.js:72:23) at MQTToTClient.continueFlows (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:212:104) at MQTToTClient.handlePacket (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:291:19) at C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:247:43 at Array.forEach (<anonymous>) at MQTToTClient.parseData (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:247:25) at processTicksAndRejections (internal/process/task_queues.js:93:5)
If I try to log in repeatedly, I will get this error every ~10 seconds:
ClientDisconnectedError: MQTToTClient got disconnected. at SafeSubscriber._next (C:\PROJ\IG\node_modules\instagram_mqtt\dist\realtime\realtime.client.js:154:30) at SafeSubscriber.__tryOrUnsub (C:\PROJ\IG\node_modules\rxjs\internal\Subscriber.js:205:16) at SafeSubscriber.next (C:\PROJ\IG\node_modules\rxjs\internal\Subscriber.js:143:22) at Subscriber._next (C:\PROJ\IG\node_modules\rxjs\internal\Subscriber.js:89:26) at Subscriber.next (C:\PROJ\IG\node_modules\rxjs\internal\Subscriber.js:66:18) at Subject.next (C:\PROJ\IG\node_modules\rxjs\internal\Subject.js:60:25) at MQTToTClient.setDisconnected (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:330:30) at Object.disconnect (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:98:26) at TLSSocket.<anonymous> (C:\PROJ\IG\node_modules\mqtts\dist\transport\tls.transport.js:36:52) at TLSSocket.emit (events.js:327:22) at endReadableNT (internal/streams/readable.js:1327:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)
How can I restart a session without my server termination?
Application Logs
2021-03-10T00:33:39.746440+00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: IgResponseError: POST /api/v1/direct_v2/threads/broadcast/text/ - 429 -; Please wait a few minutes before you try again.
2021-03-10T00:33:39.746448+00:00 app[worker.1]: at Request.handleResponseError (/app/node_modules/instagram-private-api/dist/core/request.js:125:16)
2021-03-10T00:33:39.746449+00:00 app[worker.1]: at Request.send (/app/node_modules/instagram-private-api/dist/core/request.js:53:28)
2021-03-10T00:33:39.746450+00:00 app[worker.1]: at async DirectThreadRepository.broadcast (/app/node_modules/instagram-private-api/dist/repositories/direct-thread.repository.js:176:26)
2021-03-10T00:33:39.746450+00:00 app[worker.1]: at async DirectThreadEntity.broadcast (/app/node_modules/instagram-private-api/dist/entities/direct-thread.entity.js:192:26)
2021-03-10T00:33:39.746451+00:00 app[worker.1]: at async DirectThreadEntity.broadcastText (/app/node_modules/instagram-private-api/dist/entities/direct-thread.entity.js:26:16)
2021-03-10T00:33:39.746452+00:00 app[worker.1]: (Usenode --trace-warnings ...
to show where the warning was created)
2021-03-10T00:33:39.746533+00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
2021-03-10T00:33:39.746595+00:00 app[worker.1]: (node:4) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
It could be helpful to add isFollowing in the user properties
For now, there is only one example on the website.
Adding more of them would be great because it'll help devs to understand faster how to use the API.
Lately I noticed that the event pendingRequest
no longer is emitted when an instagram user sends a message to the bot for the first time (and the bot does not follow that user). This is the event I would like to capture:
Could it be that instagram changed the event name or did an update? Is there any way to test this?
Here's my code snippet: this does not work (nothing is printed to the console at all, so I assume the event is not being emitted somehow):
client.on('pendingRequest', (chat) => {
console.log("👤 Incoming new DM request");
try {
chat.approve();
console.log("✅ accepted");
} catch(err) {
console.log("❌ error: " + err.message);
}
});
I have a log from 2020-12-08 where this feature was still working. Just leaving this info here, maybe its usefull to find the problem.
If you have hints where to look in the code and how to find out why it is not triggeren I'm happy to hear. Should I look into Nerixyz's repository or is the error in this repository? 🤔
A get() function to retrieve a message and a function to retrieve the last message of the bot in a thread.
A delete() function to delete a message.
client.on("newFollower", (client, user) => {
user.send(`test`)
});
if (message.content === '!candidature') {
message.reply('Bonjour, @' + message.author.username + ', bienvenue dans la formulaire de candidature ! Entrez votre nom: ')
const infos = {
name: null,
age: null
}
const collector = message.createMessageCollector({
filter: (m) => m.authorID === message.authorID,
idle: 10000
})
collector.on('message', (m) => {
if (!infos.name) {
infos.name = m.content
m.reply('Nom enregistré! Entrez maintenant votre âge: ')
} else if (infos.name && !infos.age) {
infos.age = m.content
m.reply('Âge enregistré! Nous vous recontactons si nous sommes intéressés !')
collector.end()
}
})
collector.on('end', (reason) => {
if (reason === 'idle') {
message.reply('Cela fait 10 secondes que vous êtes AFK, merci de renvoyer !candidature pour démarrer le formulaire une nouvelle fois !')
}
})
}
The collector works but the end event is emitted even if we end() it before
please add post media or story in this library bot
sorry i bad in english chat
When I try to fetch a channel, it doesn't work. Here is the full stack trace.
(node:4096) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'feed' of null
at Client.fetchChat (/home/busybox/dev/insta-discord/node_modules/@androz2091/insta.js/src/structures/Client.js:111:59)
at Client.<anonymous> (/home/busybox/dev/insta-discord/index.js:52:14)
at Client.emit (events.js:314:20)
at MessageCreateAction.handle (/home/busybox/dev/insta-discord/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/home/busybox/dev/insta-discord/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/home/busybox/dev/insta-discord/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
at WebSocketShard.onPacket (/home/busybox/dev/insta-discord/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
at WebSocketShard.onMessage (/home/busybox/dev/insta-discord/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
at WebSocket.onMessage (/home/busybox/dev/insta-discord/node_modules/ws/lib/event-target.js:125:16)
at WebSocket.emit (events.js:314:20)
at Receiver.receiverOnMessage (/home/busybox/dev/insta-discord/node_modules/ws/lib/websocket.js:797:20)
at Receiver.emit (events.js:314:20)
at Receiver.dataMessage (/home/busybox/dev/insta-discord/node_modules/ws/lib/receiver.js:437:14)
at Receiver.getData (/home/busybox/dev/insta-discord/node_modules/ws/lib/receiver.js:367:17)
at Receiver.startLoop (/home/busybox/dev/insta-discord/node_modules/ws/lib/receiver.js:143:22)
at Receiver._write (/home/busybox/dev/insta-discord/node_modules/ws/lib/receiver.js:78:10)
at writeOrBuffer (_stream_writable.js:352:12)
at Receiver.Writable.write (_stream_writable.js:303:10)
at TLSSocket.socketOnData (/home/busybox/dev/insta-discord/node_modules/ws/lib/websocket.js:872:35)
at TLSSocket.emit (events.js:314:20)
at addChunk (_stream_readable.js:303:12)
at readableAddChunk (_stream_readable.js:279:9)
at emitUnhandledRejectionWarning (internal/process/promises.js:168:15)
at processPromiseRejections (internal/process/promises.js:247:11)
at processTicksAndRejections (internal/process/task_queues.js:94:32)
(node:4096) TypeError: Cannot read property 'feed' of null
at Client.fetchChat (/home/busybox/dev/insta-discord/node_modules/@androz2091/insta.js/src/structures/Client.js:111:59)
at Client.<anonymous> (/home/busybox/dev/insta-discord/index.js:52:14)
at Client.emit (events.js:314:20)
at MessageCreateAction.handle (/home/busybox/dev/insta-discord/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/home/busybox/dev/insta-discord/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/home/busybox/dev/insta-discord/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
at WebSocketShard.onPacket (/home/busybox/dev/insta-discord/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
at WebSocketShard.onMessage (/home/busybox/dev/insta-discord/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
at WebSocket.onMessage (/home/busybox/dev/insta-discord/node_modules/ws/lib/event-target.js:125:16)
at WebSocket.emit (events.js:314:20)
at Receiver.receiverOnMessage (/home/busybox/dev/insta-discord/node_modules/ws/lib/websocket.js:797:20)
at Receiver.emit (events.js:314:20)
at Receiver.dataMessage (/home/busybox/dev/insta-discord/node_modules/ws/lib/receiver.js:437:14)
at Receiver.getData (/home/busybox/dev/insta-discord/node_modules/ws/lib/receiver.js:367:17)
at Receiver.startLoop (/home/busybox/dev/insta-discord/node_modules/ws/lib/receiver.js:143:22)
at Receiver._write (/home/busybox/dev/insta-discord/node_modules/ws/lib/receiver.js:78:10)
at writeOrBuffer (_stream_writable.js:352:12)
at Receiver.Writable.write (_stream_writable.js:303:10)
at TLSSocket.socketOnData (/home/busybox/dev/insta-discord/node_modules/ws/lib/websocket.js:872:35)
at TLSSocket.emit (events.js:314:20)
at addChunk (_stream_readable.js:303:12)
at readableAddChunk (_stream_readable.js:279:9)
I want to send a message if the user follow the bot, but nothing happens, no error, no message.
clienti.on('newFollower', (user) => {
console.log('╭───────────────────────────╮')
console.log('| ➜ Nouveau follower ! |')
console.log('╰───────────────────────────╯')
user.send('🛬 Merci d\'utiliser pro_note_ !');
});```
When a new user DM's the bot for the first time, the message usually gets added to pendingRequests
. When you try to approve the chat directly and message back instantly, there is an error. Approving the new user works fine, however the message will not be emitted and throw an error.
Example of breaking code:
client.on('pendingRequest', (chat) => {
chat.approve();
});
I fixed this issue with this pull request. Leaving here in case someone has the same issue.
When you make an user admin in a groups you get an error:
(node:10408) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse (<anonymous>)
at C:\Users\minit\Desktop\CODING\JS\InstaBot\node_modules\@androz2091\insta.js\src\structures\Client.js:171:53
at Array.forEach (<anonymous>)
at C:\Users\minit\Desktop\CODING\JS\InstaBot\node_modules\@androz2091\insta.js\src\structures\Client.js:128:33
at Array.forEach (<anonymous>)
at InstaBot.handleRealtimeReceive (C:\Users\minit\Desktop\CODING\JS\InstaBot\node_modules\@androz2091\insta.js\src\structures\Client.js:127:25)
at RealtimeClient.<anonymous> (C:\Users\minit\Desktop\CODING\JS\InstaBot\node_modules\@androz2091\insta.js\src\structures\Client.js:269:61)
at RealtimeClient.emit (events.js:314:20)
at SafeSubscriber._next (C:\Users\minit\Desktop\CODING\JS\InstaBot\node_modules\instagram_mqtt\dist\realtime\realtime.client.js:120:26)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
And this error when you add / remove an user to the group
(node:10408) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'messages' of undefined
at C:\Users\minit\Desktop\CODING\JS\InstaBot\node_modules\@androz2091\insta.js\src\structures\Client.js:184:47
at Array.forEach (<anonymous>)
at C:\Users\minit\Desktop\CODING\JS\InstaBot\node_modules\@androz2091\insta.js\src\structures\Client.js:128:33
at Array.forEach (<anonymous>)
at InstaBot.handleRealtimeReceive (C:\Users\minit\Desktop\CODING\JS\InstaBot\node_modules\@androz2091\insta.js\src\structures\Client.js:127:25)
at RealtimeClient.<anonymous> (C:\Users\minit\Desktop\CODING\JS\InstaBot\node_modules\@androz2091\insta.js\src\structures\Client.js:269:61)
at RealtimeClient.emit (events.js:314:20)
at SafeSubscriber._next (C:\Users\minit\Desktop\CODING\JS\InstaBot\node_modules\instagram_mqtt\dist\realtime\realtime.client.js:120:26)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Bonsoir Androz 👋
Je viens de parcourir la documentation mais je n'ai trouvé aucun moyen pour vérifier avec les évents si un utilisateur quelconque viens d'arrêter de nous suivre.
Est ce possible ? Ou alors est ce prévu ?
Bonne fin de soirée.
Integrate this into the send() function or create another function
Hi i want to ask about multiple login session, is it possible?
The title speaks for itself :)
Hi all,
If "message.author.id" and "client.user.id" are the same, I cannot get to which user the message was sent.
client.on('messageCreate', (message) => {
console.log(message.to_username) // ??
});
This error is emitted when i send a message to the bot (not a command)
Here is the full error.
(node:9644) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'messages' of undefined
at C:\Users\minit\Desktop\CODING\JS\InstaBot\node_modules\@androz2091\insta.js\src\structures\Client.js:116:30
at Array.forEach (<anonymous>)
at C:\Users\minit\Desktop\CODING\JS\InstaBot\node_modules\@androz2091\insta.js\src\structures\Client.js:97:33
at Array.forEach (<anonymous>)
at InstaClient.handleRealtimeReceive (C:\Users\minit\Desktop\CODING\JS\InstaBot\node_modules\@androz2091\insta.js\src\structures\Client.js:96:25)
at RealtimeClient.<anonymous> (C:\Users\minit\Desktop\CODING\JS\InstaBot\node_modules\@androz2091\insta.js\src\structures\Client.js:211:61)
at RealtimeClient.emit (events.js:314:20)
at SafeSubscriber._next (C:\Users\minit\Desktop\CODING\JS\InstaBot\node_modules\instagram_mqtt\dist\realtime\realtime.client.js:120:26)
at processTicksAndRejections (internal/process/task_queues.js:93:5)```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.