We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89c9741 commit a06a0b7Copy full SHA for a06a0b7
MountainProjectBot/RedditHelper.cs
@@ -52,7 +52,16 @@ public async Task Auth(string filePath)
52
redditService = new Reddit(webAgent, true);
53
54
foreach (string subRedditName in subredditNamesAndCommentAmounts.Keys)
55
- Subreddits.Add(await redditService.GetSubredditAsync(subRedditName));
+ {
56
+ try
57
58
+ Subreddits.Add(await redditService.GetSubredditAsync(subRedditName));
59
+ }
60
+ catch (Exception ex)
61
62
+ Console.WriteLine($"Could not add subreddit {subRedditName}: {ex.Message}");
63
64
65
66
Console.WriteLine("Reddit authed successfully");
67
}
0 commit comments