Skip to content

Commit

Permalink
fix: actually store twitch game ID
Browse files Browse the repository at this point in the history
  • Loading branch information
tsa96 authored and Gocnak committed Jan 14, 2024
1 parent 7cbda9c commit 4ef4e87
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions MomentumDiscordBot/Services/TwitchApiService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class TwitchApiService
private readonly ConcurrentDictionary<string, string> _categoryNames = new();

private readonly ILogger _logger;
private readonly string _momentumModGameId = null;
private string _momentumModGameId = null;

public TwitchApiService(ILogger logger, Configuration config)
{
Expand All @@ -34,7 +34,8 @@ public TwitchApiService(ILogger logger, Configuration config)
public async Task<string> GetMomentumModIdAsync()
{
var games = await _apiService.Helix.Games.GetGamesAsync(gameNames: new List<string> { "Momentum Mod" });
return games.Games.First().Id;
_momentumModGameId = games.Games.First().Id;
return _momentumModGameId;
}

public async Task<string> GetGameNameAsync(string id)
Expand Down

0 comments on commit 4ef4e87

Please sign in to comment.