Qolors / FeedCord

A dead simple RSS Feed with Discord Webhooks
MIT License
150 stars 9 forks source link

Unhandled Exception #19

Closed sbeachx75 closed 7 months ago

sbeachx75 commented 7 months ago

This isn't an issue with the code–more my own ignorance–but hopefully, you can help me troubleshoot this.

appsettings.json { "Id": "blah blah", "RssUrls": [ "https://blah.blah/rss/" ], "YoutubeUrls": [ "" ], "DiscordWebhookUrl": "https://discord.com/api/webhooks/blah", "RssCheckIntervalMinutes": 60, "EnableAutoRemove": true, "Color": 8411391, "DescriptionLimit": 200, "Forum": true }

docker-compose.yaml `version: "3.9"

services: myfeedcord:

image: qolors/feedcord:latest # for amd64 architecture

image: qolors/feedcord:latest-arm64  # For arm64 architecture (Uncomment this line and comment the above if using arm64)
container_name: FeedCord
restart: unless-stopped
volumes:
  - /Users/blahblah/Documents/blah/appsettings.json:/app/config/appsettings.json`

I'm getting an unhandled exception. I suspect it's my volume file path, but I don't know why.

Qolors commented 7 months ago

Hey @sbeachx75 ! Are you able to provide any more information on the exception? Perhaps the exact wording of it?

sbeachx75 commented 7 months ago

Of course!

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.

Qolors commented 7 months ago

@sbeachx75 let's make sure your config is set up correctly first.

With your config file - your current set up needs to be wrapped inside of an array called Instances. This is so you can run multiple at a time if desired, and is also required.

Yours should look something like this:

{
> "Instances": [
> > { 
> > > "Id": "blah blah",
> > > "Username": "blah",
> > > "RssUrls": [ "https://blah.blah/rss/" ], 
> > > "YoutubeUrls": [ "" ], 
> > > "DiscordWebhookUrl": "https://discord.com/api/webhooks/blah",
> > > "RssCheckIntervalMinutes": 60, 
> > > "EnableAutoRemove": true, 
> > > "Color": 8411391, 
> > > "DescriptionLimit": 200, 
> > > "Forum": true 
> > }
> ]
}
sbeachx75 commented 7 months ago

Thanks for your help! A couple of formatting things did the trick, but it created a new forum post instead of my intended forum channel. Does FeedCord support thread_id or just thread_name?

Qolors commented 7 months ago

it currently only works with thread_name currently - thread_id could be supported in the next update if it's desired!

sbeachx75 commented 7 months ago

That would be awesome! The way my Discord server is setup, there are forums by topic, so I'd like to put RSS updates into respective forum channels rather than create new ones.