diff --git a/MountainProjectBot/RedditHelper.cs b/MountainProjectBot/RedditHelper.cs index d9c94b8..757d3c8 100644 --- a/MountainProjectBot/RedditHelper.cs +++ b/MountainProjectBot/RedditHelper.cs @@ -52,7 +52,16 @@ public async Task Auth(string filePath) redditService = new Reddit(webAgent, true); foreach (string subRedditName in subredditNamesAndCommentAmounts.Keys) - Subreddits.Add(await redditService.GetSubredditAsync(subRedditName)); + { + try + { + Subreddits.Add(await redditService.GetSubredditAsync(subRedditName)); + } + catch (Exception ex) + { + Console.WriteLine($"Could not add subreddit {subRedditName}: {ex.Message}"); + } + } Console.WriteLine("Reddit authed successfully"); }