private void Mentions() { GetUpdates getMentions = new GetUpdates(); ScreenDraw draw = new ScreenDraw(); getMentions.GetMentions(); TimerMan.Pause(); draw.ShowMentions(); Actions twitterMethods = new Actions(); MentionsConsole(); if (Settings.AFK == false) { TimerMan.Resume(); } draw.ShowTimeline(); User.CounterConsoleWin.Refresh(); }
/// <summary> /// Favorites or unfavorites a tweet /// </summary> /// <param name="command">The entire command string</param> /// <returns></returns> private void FavoriteTweet(string command) { if (User.IsMissingArgs(command) == false) /* It's just an exception catching method, don't mind it */ { if (command.Split(' ')[1].Length != 2) { ScreenDraw.ShowMessage("Wrong syntax. Use /fav [id]"); } else { SendTweetOptions replyOpts = TweetIdentification.GetTweetID(command.Split(' ')[1]); FavoriteTweetOptions favOpts = new FavoriteTweetOptions(); GetUpdates favoriteInvert = new GetUpdates(); long tweetID = Convert.ToInt64(replyOpts.InReplyToStatusId); favOpts.Id = tweetID; InteractiveTweet tweet = null; try { tweet = TweetIdentification.FindTweet(tweetID); } catch (KeyNotFoundException exIn) { ScreenDraw.ShowMessage(exIn.Message); return; } if (tweet.IsDirectMessage == false) { if (tweet.IsFavorited) { ScreenDraw.ShowMessage("Unfavoriting"); UnfavoriteTweetOptions unfavOpts = new UnfavoriteTweetOptions(); unfavOpts.Id = favOpts.Id; User.Account.BeginUnfavoriteTweet(unfavOpts); favoriteInvert.InvertFavoriteStatus(tweetID); /* Changes whether the tweet is counted as favorited */ } else { User.Account.BeginFavoriteTweet(favOpts); ScreenDraw.ShowMessage("Favoriting"); favoriteInvert.InvertFavoriteStatus(tweetID); /* Changes whether the tweet is counted as favorited */ } } else { ScreenDraw.ShowMessage("You can't favorite DMs, silly"); } } } }