Esempio n. 1
0
        public void Run(IWebAgent agent, string subreddit, Tweeter tweeter)
        {
            sub        = RedditSharp.Things.Subreddit.GetByNameAsync(agent, subreddit).Result;
            subTweeter = tweeter;
            var stream = sub.GetModerationLog().Stream();

            stream.Subscribe(this);
            stream.Enumerate(new System.Threading.CancellationToken());
        }
Esempio n. 2
0
 public static void CheckLoggers()
 {
     SpezzitBotReddit.User.GetModeratorSubreddits().ForEachAsync(sub => {
         if (!activeLoggers.ContainsKey(sub.Name))
         {
             Tweeter t    = new Tweeter(Configuration);
             LogWatcher w = new LogWatcher();
             w.Run(RedditAgent, sub.Name, t);
             activeLoggers.Add(sub.Name, w);
         }
     }).Wait();
 }