Giter VIP home page Giter VIP logo

instagramembeddiscordbot's People

Contributors

angkanalog avatar bagus-septianto avatar bman46 avatar dependabot[bot] avatar freschnde avatar yannikhoeflich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

instagramembeddiscordbot's Issues

Public account incorrectly shown as private with /subscribe command

While the /profile do work on the account I intend to follow. When I try the /subscribe command the bot show me this exact message :
"The account appears to be private and cannot be viewed by the bot."

So here is my config.json file (with / for sensitive datas) :

  "Token": "/",
  "Prefix": [ "https://www.instagram.com/", "https://instagram.com/", "http://www.instagram.com/", "http://instagram.com/" ],
  "OwnerID": "738454617272221787",
  "TestGuildID": "/",
  "DMErrors": true,

  "IGAccounts": [
    {
      "username": "3rdlanefgr",
      "password": "/",
      "OTPSecret": "IG OTP Secret (optional)",
      "UsageTimes": [
        {
          "StartHour": "",
          "EndHour": ""
        }
      ]
    },
    {
      "username": "markusa.75",
      "password": "/",
      "OTPSecret": "IG OTP Secret (optional)",
      "UsageTimes": [
        {
          "StartHour": "",
          "EndHour": ""
        }
      ]
    }
  ],

  "ProxyURL": "",
  "ProxyUsername": "username (optional)",
  "ProxyPassword": "password (optional)",

  "AllowSubscriptions": true,
  "MongoDBUrl": "/",
  "DefaultSubscriptionsPerGuildMax": 1,
  "HoursToCheckForNewContent": 3
}

The @3rdlanefgr is a public account associated with my real account, @markusa.75 is just a private account. I may be wrong but both should be able to be used by the bot when I type in my server /subscribe (public account). Both of these accounts are currently following on Instagram the public account that I intend to subscribe to.

To me, the error message is when the bot show me this on the console :
"Failed to get user. InternalException: Error converting value {null} to type 'System.Boolean'. Path 'user.auto_expand_chaining', line 1, position 5671.."
or for an other example :
"Failed to get user. InternalException: Error converting value {null} to type 'System.Boolean'. Path 'user.auto_expand_chaining', line 1, position 5764.."

Here is a long extract of my console log :

10:46:06 Gateway     Connecting
Starting the subscription task...
10:46:07 Gateway     Connected
0 Shard Ready
Register Commands...
Global
10:46:08 Gateway     Ready
Slash Command Executed
Warning: No time set on account 3rdlanefgr. Using the account.
Logging in
android-9ff84c756d6d868f
Loading state from file
Slash Command Executed
Warning: No time set on account 3rdlanefgr. Using the account.
Logged in
Exception: Newtonsoft.Json.JsonSerializationException: Error converting value {null} to type 'System.Boolean'. Path 'user.auto_expand_chaining', line 1, position 5700.
 ---> System.InvalidCastException: Null object cannot be converted to a value type.
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
   --- End of inner exception stack trace ---
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   at InstagramApiSharp.API.Processors.UserProcessor.GetUserInfoAsync(Uri userUri)
Stacktrace:    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   at InstagramApiSharp.API.Processors.UserProcessor.GetUserInfoAsync(Uri userUri)
Failed to get user. InternalException: Error converting value {null} to type 'System.Boolean'. Path 'user.auto_expand_chaining', line 1, position 5700..
Slash Command Executed
Warning: No time set on account 3rdlanefgr. Using the account.
Logged in
Get username failure: System.NullReferenceException: Object reference not set to an instance of an object.
   at Instagram_Reels_Bot.Helpers.InstagramProcessor.GetUserIDFromUsername(String username) in D:\a\InstagramEmbedDiscordBot\InstagramEmbedDiscordBot\Instagram Reels Bot\Helpers\Instagram\InstagramProcessor.cs:line 276
   at Instagram_Reels_Bot.Modules.SlashCommands.Subscribe(String username) in D:\a\InstagramEmbedDiscordBot\InstagramEmbedDiscordBot\Instagram Reels Bot\Modules\SlashCommands.cs:line 305
Slash Command Executed
Warning: No time set on account 3rdlanefgr. Using the account.
Logged in
Slash Command Executed
Warning: No time set on account 3rdlanefgr. Using the account.
Logged in
Exception: Newtonsoft.Json.JsonSerializationException: Error converting value {null} to type 'System.Boolean'. Path 'user.auto_expand_chaining', line 1, position 5671.
 ---> System.InvalidCastException: Null object cannot be converted to a value type.
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
   --- End of inner exception stack trace ---
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   at InstagramApiSharp.API.Processors.UserProcessor.GetUserInfoAsync(Uri userUri)
Stacktrace:    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   at InstagramApiSharp.API.Processors.UserProcessor.GetUserInfoAsync(Uri userUri)
Failed to get user. InternalException: Error converting value {null} to type 'System.Boolean'. Path 'user.auto_expand_chaining', line 1, position 5671..
Warning: No time set on account 3rdlanefgr. Using the account.
Logged in
Getting new posts!
Done.

To give you an example about what the bot showed me, I attached to the message some screenshots about the account https://www.instagram.com/todayfood/ that I wanted to subscribe (username : todayfood).

Screenshot from Discord :

screenshot_2023-07-10_1

Screenshot from the console :

image

I hope I have shared all the necessary informations to solve the problem.
Thank you in advance !

Not working on VPS

Instagram have a detection of IP, so if is not a residential IP you can't do a request to his API, I tried to solve it on my own, but I have not succeeded, I hope you find a solution, since no one is going to put the bot on your local computer 24/7

Add support for spoilers in text commands

I'd like support for spoilers when using text commands just as is available with slash commands.

By updating the prefix to include the two pipes, the bot still recognizes the instagram link.

 "Prefix": [ "https://www.instagram.com/", "https://instagram.com/", "http://www.instagram.com/", "http://instagram.com/", "||https://instagram.com/", "|| https://instagram.com/"  ]

The bot could register that the prefix contains pipes and use the isSpoiler parameter in FileAttachment (like with the slash commands).

It appears the infrastructure is already present, and just needs to detect whether the text command or prefix contains pipes and adjust accordingly.

Add slash command for processing posts

With Discord making text a privileged gateway, a fallback has to be added to allow for the bot to continue to operate.
A /url command would probably work well.

REQUEST: Allow thread support

Wouldn't it be great if threads could be supported? This would make the bot stand out in a subtle way beautifully.

Carousel Post

Hey, Thanks for making this awesome discord bot. It's so helpful for us.

I just wanna suggest to see carousel post on discord too for new feature. It would be less time consuming for us if you could make this.

Once again thank you for developing this awesome bot. Keep Working on it!

Prevent double embed

Sometimes, the default discord embedding decides to work, and in these cases we get two embeds for that link, one default and one from this bot. Is there a good way to prevent this?

Subscribe deleting account

When the bot get blocked by IG, it reacts as if the account that the bot is subscribed to was deleted from IG and unsubscribes from it.
Workaround: set DisableSubscribeCleanup to false in the config. Restart the bot.

startfile missed

The instructions say: "find the file named Instagram Reels Bot with no extensions". Unfortunately, there is no such file without an extension.

add typing event

typing event
add typing event so user know that their command is being processed. very useful for bot that has slow upload speed

Guilds command reaches discord max characters

the guilds command reaches the maximum amount of characters in a message which results in the message not being sent. Needs to be updated to break the list down into multiple messages.

Add button to delete post

Allow for a user to delete embeds that may be accidentally added. Only the user that triggered the embed should be able to use this function.

not start

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

Clean up code

Things to do:

  • Slash commands need to be cleaned up to work more like the post commands.
  • Condense code and remove duplicate code (more functions)
  • create a helper class for misc functions (and condensed code)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.