sirkris / Reddit.NET

A Reddit API library for .NET Standard with OAuth support. Written in C#.
MIT License
508 stars 78 forks source link

The best way to listen to added comments #144

Closed Echarnus closed 2 years ago

Echarnus commented 2 years ago

I'm currently creating a bot which listens to every new post/ comment on a defined subreddit. As far as I'm understanding, Reddit.NET's monitoring is fetching posts/ comments and compare them to an earlier fetched result.

In my opinion this method is creating a lot of traffic of course, especially if you keep monitoring every post. Thus I will have to program I only listen to only a select amount of posts.

Another downside is, I'm only listening to the root comments of a post, not all comments.

Thus, I'm wondering, isn't there some sort of webhook available which is called when a post/ comment is created or just an alternative way to be notified about every new comment made on a subreddit?

newPost.Comments.NewUpdated += OnNewCommentUpdated; newPost.Comments.MonitorNew(); _postsQueue.Enqueue(newPost);

Echarnus commented 2 years ago

SubReddit.Comments did the trick of course;