Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
stqcky committed Feb 9, 2020
1 parent 61484a9 commit 1009571
Show file tree
Hide file tree
Showing 97 changed files with 28 additions and 36,118 deletions.
Binary file modified source/.vs/Twitchifier/v16/.suo
Binary file not shown.
Binary file not shown.
34 changes: 28 additions & 6 deletions source/TwitchNotifier/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,29 @@ static async void setUIDs()

static async Task<string> GetGame(string uid)
{
var stream = await api.V5.Streams.GetStreamByUserAsync(uid);
return stream.Stream.Game;
try
{
var stream = await api.V5.Streams.GetStreamByUserAsync(uid);
return stream.Stream.Game;
}
catch (Exception)
{
return "No game";
}
}

static async Task<string> GetUserID(string username)
{
TwitchLib.Api.V5.Models.Users.Users user = await api.V5.Users.GetUserByNameAsync(username);
return user.Matches[0].Id;
while (true)
{
try
{
TwitchLib.Api.V5.Models.Users.Users user = await api.V5.Users.GetUserByNameAsync(username);
return user.Matches[0].Id;
}
catch (Exception)
{}
}
}

static async Task<List<string>> GetFollowing(string uid)
Expand All @@ -96,8 +111,15 @@ static async Task<List<string>> GetFollowing(string uid)

static async Task<bool> IsOnline(string uid)
{
bool isStreaming = await api.V5.Streams.BroadcasterOnlineAsync(uid);
return isStreaming;
try
{
bool isStreaming = await api.V5.Streams.BroadcasterOnlineAsync(uid);
return isStreaming;
}
catch (Exception)
{
return false;
}
}

async void LiveCheck()
Expand Down

This file was deleted.

11,262 changes: 0 additions & 11,262 deletions source/TwitchNotifier/asd/Newtonsoft.Json.xml

This file was deleted.

Binary file removed source/TwitchNotifier/asd/Twitchifier.exe
Binary file not shown.
45 changes: 0 additions & 45 deletions source/TwitchNotifier/asd/Twitchifier.exe.config

This file was deleted.

Binary file removed source/TwitchNotifier/asd/Twitchifier.pdb
Binary file not shown.

This file was deleted.

Loading

0 comments on commit 1009571

Please sign in to comment.