public FollowData(TwitchLib.TwitchChannel channel)
 {
     this.channel = channel;
     if (channel.Mature)
         chatMessage = string.Format("Go follow {0} (mature channel), they've been playing: {1}! http://twitch.tv/{0}", channel.Name, channel.Game);
     else
         chatMessage = string.Format("Go follow {0}, they've been playing: {1}! http://twitch.tv/{0}", channel.Name, channel.Game);
 }
Exemple #2
0
 public FollowData(TwitchLib.TwitchChannel channel)
 {
     this.channel = channel;
     if (channel.Mature)
     {
         chatMessage = string.Format("Go follow {0} (mature channel), they've been playing: {1}! http://twitch.tv/{0}", channel.Name, channel.Game);
     }
     else
     {
         chatMessage = string.Format("Go follow {0}, they've been playing: {1}! http://twitch.tv/{0}", channel.Name, channel.Game);
     }
 }
Exemple #3
0
 // Method to send message in discord and fire all whispers
 private void fireAllWhisperNotifications()
 {
     TwitchLib.TwitchChannel channel = Common.StreamRefresher.Stream.Channel;
     if (Common.DiscordClient != null)
     {
         Common.relay(string.Format("{0} Hey guys! Burke just went live playing: {1}, title: {2}. Channel: {3}.", greetings[new Random().Next(0, greetings.Length)], channel.Game, channel.Status, "http://twitch.tv/burkeblack"));
     }
     foreach (string user in usersToNotify)
     {
         if (Common.WhisperClient != null)
         {
             Common.WhisperClient.SendWhisper(user, string.Format("Burke just went live playing: {0}, title: {1}. Channel: {2}. !removeme to stop receiving notifications.", channel.Game, channel.Status, "http://twitch.tv/burkeblack"), Common.DryRun);
         }
         System.Threading.Thread.Sleep(2000);
     }
 }
        // Downloads a streamer's most recent game asynchonously from TwitchLib API and returns it
        public async static Task <string> getStreamersMostRecentGame(string streamer)
        {
            TwitchLib.TwitchChannel channelData = await TwitchLib.TwitchApi.GetTwitchChannel(streamer);

            return(channelData.Game);
        }