bman46 / InstagramEmbedDiscordBot

Embeds videos and images from an Instagram link into a Discord chat.
BSD 3-Clause "New" or "Revised" License
75 stars 25 forks source link

not start #54

Closed mulano1977 closed 1 year ago

mulano1977 commented 1 year ago

me again :)

The bot doesn't start in tmux for me. I downloaded the current IGReelsBot-2.12.0-linux-x64.tar, unpacked it and put it on my server. Started tmux with "tmux new -s instagram" in the bot's folder and started node "Instagram Reels Bot". Then get an error:

Instagram Reels Bot:1
ELEVEN
^

SyntaxError: Invalid or unexpected token
     at Object.compileFunction (node:vm:360:18)
     at wrapSafe (node:internal/modules/cjs/loader:1078:15)
     at Module._compile (node:internal/modules/cjs/loader:1113:27)
     at Module._extensions..js (node:internal/modules/cjs/loader:1203:10)
     at Module.load (node:internal/modules/cjs/loader:1027:32)
     at Module._load (node:internal/modules/cjs/loader:868:12)
     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
     at node:internal/main/run_main_module:23:47

Node.js v18.10.0
bman46 commented 1 year ago

It is not written in JS (so no node) and is already compiled. Just do ./Instagram Reels Bot to launch it.

mulano1977 commented 1 year ago

okay works :) is there a guide for MongoDB how it should work under Linux? Subscribing only works with that, right?

bman46 commented 1 year ago

Subscribe only works with mongo db. You could probably just find a guide on YouTube/Google, but I would suggest using the free tier on MongoDB’s cloud site.

On Oct 5, 2022, at 6:30 PM, mulano1977 @.***> wrote:

okay works :) is there a guide for MongoDB how it should work under Linux? Subscribing only works with that, right?

— Reply to this email directly, view it on GitHub https://github.com/bman46/InstagramEmbedDiscordBot/issues/54#issuecomment-1269053229, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQAZR4OYLREOQSKXDHBC23WBX6RBANCNFSM6AAAAAAQ56YXBM. You are receiving this because you commented.

mulano1977 commented 1 year ago

okay thanks for the tip :) does he then automatically post new content?

bman46 commented 1 year ago

Yes, it will automatically post new content every couple hours (as defined in the config). Note that it is not instant.

mulano1977 commented 1 year ago

now have mongodb installed on my server. what is the link to the db? "MongoDBUrl": "mongodb://127.0.0.1:27017", or "MongoDBUrl": "mongodb://username:password@127.0.0.1:27017", doesn't seem to work. Do you have a tip for me?

Do I still have to create tables or does he do it himself? The bot just says "Sorry, Something went wrong..." when I want to subscribe to someone

bman46 commented 1 year ago

What error shows in the console?

mulano1977 commented 1 year ago
02:51:55 Gateway     Connecting
Starting the subscription task...
02:51:56 Gateway     You're using the PresenceUpdate event without specifying the GuildPresences intent. Discord wont send this event to your client without the intent set in your config.
02:51:56 Gateway     Connected
0 Shard Ready
Register Commands...
Global
02:51:57 Gateway     Ready
Slash Command Executed
Warning: No time set on account *****. Using the account.
Logging in
02:52:09 App Command System.Exception: Failed login. Account: ******* Error: The username you entered doesn't appear to belong to an account. Please check your username and try again.
   at Instagram_Reels_Bot.Helpers.InstagramProcessor.InstagramLogin(IGAccount account) in /home/runner/work/InstagramEmbedDiscordBot/InstagramEmbedDiscordBot/Instagram Reels Bot/Helpers/Instagram/InstagramProcessor.cs:line 139
   at Instagram_Reels_Bot.Helpers.InstagramProcessor..ctor(IGAccount account) in /home/runner/work/InstagramEmbedDiscordBot/InstagramEmbedDiscordBot/Instagram Reels Bot/Helpers/Instagram/InstagramProcessor.cs:line 33
   at Instagram_Reels_Bot.Modules.SlashCommands.Subscribe(String username) in /home/runner/work/InstagramEmbedDiscordBot/InstagramEmbedDiscordBot/Instagram Reels Bot/Modules/SlashCommands.cs:line 262
   at Discord.Interactions.Builders.ModuleClassBuilder.<>c__DisplayClass11_0.<<CreateCallback>g__ExecuteCallback|1>d.MoveNext()
Error: Exception

But the username is correct -.-

bman46 commented 1 year ago

Usually means that the bot cannot access instagram to log in. Are you using a cloud platform or home lab? Cloud platforms usually get blacklisted/blocked by IG.

mulano1977 commented 1 year ago

no, I rented a dedicated server with a fixed IP. Try turning the firewall on and off. unfortunately it doesn't work with the firewall switched off either. Too bad, only fails at login :(

bman46 commented 1 year ago

Likely due to IP association with the VPS; static IPs wont help as the ASN is still associated with the cloud provider. Try logging in on a browser on the server.

mulano1977 commented 1 year ago

well don't use a graphical interface in Linux. Especially since the IP would remain the same in the browser. Too bad actually. Maybe it will work later when I come back. Thank you for your effort and your time :)

bman46 commented 1 year ago

For the browser, you could use an SSH tunnel from your main computer to the server to access websites through its network. The IP will remain the same in the browser, but trying to access the site from the browser sometimes allows the bot to get through.