Skip to content

Commit

Permalink
Add DiscordClient to ServiceCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
Sella-GH committed Jul 21, 2024
1 parent 9684fde commit 924b0b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public static void AzzyBotServices(this IServiceCollection services, bool isDock
services.AddHostedService(s => s.GetRequiredService<TimerServiceHost>());

services.AddLavalink();
services.AddSingleton(s => s.GetRequiredService<DiscordBotServiceHost>().Client);
services.ConfigureLavalink(config =>
{
config.BaseAddress = (isDocker) ? new("http://AzzyBot-Ms:2333") : new("http://localhost:2333");
Expand Down
2 changes: 1 addition & 1 deletion src/AzzyBot-Next.Bot/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static async Task Main(string[] args)
if (isDocker && !skipDbWaiting)
{
// Give the database time to start up
await Task.Delay(TimeSpan.FromSeconds(30));
await Task.Delay(TimeSpan.FromSeconds(15));
}

// https://stackoverflow.com/a/71786309
Expand Down

0 comments on commit 924b0b5

Please sign in to comment.