Skip to content

Commit

Permalink
Fix configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
Penple committed Sep 18, 2020
1 parent 31f3f14 commit d54a223
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion FungusBot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ static void Main(string[] args)
private GameState lastGameState;

public async Task MainAsync() {
_config = BuildConfig();
var services = ConfigureServices();

memory = services.GetRequiredService<MemoryService>();
state = services.GetRequiredService<StateService>();

_client = services.GetRequiredService<DiscordSocketClient>();
_config = BuildConfig();

_client.Log += LogAsync;
services.GetRequiredService<CommandService>().Log += LogAsync;
Expand Down
1 change: 1 addition & 0 deletions FungusBot/Services/StateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public class StateService {
public StateService(IServiceProvider services) {
_discord = services.GetRequiredService<DiscordSocketClient>();
_memory = services.GetRequiredService<MemoryService>();
_config = services.GetRequiredService<IConfiguration>();
_services = services;

_discord.Ready += InitAsync;
Expand Down

0 comments on commit d54a223

Please sign in to comment.