jake-walker / instagram-discord-bridge Goto Github PK
View Code? Open in Web Editor NEW💬 A bot that 'syncs' messages between Instagram and Discord.
License: GNU General Public License v3.0
💬 A bot that 'syncs' messages between Instagram and Discord.
License: GNU General Public License v3.0
I have an issue where the program will check too many times a minute, giving an ugly error. Is there a way to prevent this error, rather than just catching it?
(node:57585) UnhandledPromiseRejectionWarning: IgResponseError: GET /api/v1/direct_v2/inbox/?visual_message_return_type=unseen&thread_message_limit=10&persistentBadging=true&limit=20 - 429 Too Many Requests; Please wait a few minutes before you try again.
at Request.handleResponseError (/home/ubuntu/instagram-discord-bridge/node_modules/instagram-private-api/dist/core/request.js:125:16)
at Request.send (/home/ubuntu/instagram-discord-bridge/node_modules/instagram-private-api/dist/core/request.js:53:28)
(node:57585) 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(). (rejection id: "x")
where "x" is initially 1, which increases by one every time error is thrown.
Hello,
How do we get the Instagram thread ID please ?
I know how to get it on Discord but I don't know how on Instagram.
Thank's
I tested it with multiple channels, 2 on server and also with dms with that bot.
I have this output:
ℹ info Setting up Instagram...
⬤ debug Logging into Instagram...
⬤ debug Trying normal login...
ℹ info Setting up Discord...
/root/tmp/instagram-discord-bridge/node_modules/discord.js/src/client/ClientDataManager.js:81
guild.channels.set(channel.id, channel);
^
TypeError: Cannot read property 'id' of undefined
at ClientDataManager.newChannel (/root/tmp/instagram-discord-bridge/node_modules/discord.js/src/client/ClientDataManager.js:81:36)
at Guild.setup (/root/tmp/instagram-discord-bridge/node_modules/discord.js/src/structures/Guild.js:206:68)
at GuildCreateHandler.handle (/root/tmp/instagram-discord-bridge/node_modules/discord.js/src/client/websocket/packets/handlers/GuildCreate.js:12:15)
at WebSocketPacketManager.handle (/root/tmp/instagram-discord-bridge/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:105:65)
at WebSocketConnection.onPacket (/root/tmp/instagram-discord-bridge/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (/root/tmp/instagram-discord-bridge/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
at WebSocket.onMessage (/root/tmp/instagram-discord-bridge/node_modules/ws/lib/event-target.js:120:16)
at WebSocket.emit (events.js:314:20)
at Receiver.receiverOnMessage (/root/tmp/instagram-discord-bridge/node_modules/ws/lib/websocket.js:789:20)
at Receiver.emit (events.js:314:20)
at Receiver.dataMessage (/root/tmp/instagram-discord-bridge/node_modules/ws/lib/receiver.js:413:14)
at Receiver.getData (/root/tmp/instagram-discord-bridge/node_modules/ws/lib/receiver.js:352:17)
at Receiver.startLoop (/root/tmp/instagram-discord-bridge/node_modules/ws/lib/receiver.js:138:22)
at Receiver._write (/root/tmp/instagram-discord-bridge/node_modules/ws/lib/receiver.js:74:10)
at doWrite (_stream_writable.js:403:12)
at writeOrBuffer (_stream_writable.js:387:5)
at Receiver.Writable.write (_stream_writable.js:318:11)
at TLSSocket.socketOnData (/root/tmp/instagram-discord-bridge/node_modules/ws/lib/websocket.js:864:35)
at TLSSocket.emit (events.js:314:20)
at addChunk (_stream_readable.js:297:12)
at readableAddChunk (_stream_readable.js:272:9)
at TLSSocket.Readable.push (_stream_readable.js:213:10)
Sometimes, I get this error after restarting a few times. Is it due to a temporary IP ban and is there a way to get around this?
Unhandled rejection IgLoginRequiredError: GET /api/v1/accounts/current_user/?edit=true - 403 Forbidden; login_required
at Request.handleResponseError (/home/ubuntu/instagram-discord-bridge/node_modules/instagram-private-api/dist/core/request.js:113:24)
at Request.send (/home/ubuntu/instagram-discord-bridge/node_modules/instagram-private-api/dist/core/request.js:53:28)
I know this is a bug also in Instagram Web so i am under the impression that's not even possible to know which image of the entire post was the shared one.
In that case i find it's better to forward to Discord every image of the post or a link to the post. Instead of only sending the first one.
I would appreciate it quite a lot if dear maintainer or someone else fix this 'bug'.
Thanks in advance.
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.