-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram.cs
More file actions
34 lines (29 loc) · 958 Bytes
/
Copy pathProgram.cs
File metadata and controls
34 lines (29 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using Bot.Enums;
using Bot.StartupTasks;
namespace Bot;
internal class Program
{
private static async Task Main()
{
AppContext.SetSwitch("System.Net.DisableIPv6", true);
StartupTaskRunner runner = new StartupTaskRunner()
.Add<LoadConfig>()
.Add<LoggerSetup>()
.Add<RedisSetup>()
.Add<NpgsqlSetup>()
.Add<LoadInMemorySettings>()
.Add<MainClientSetup>()
.Add<AnonClientSetup>()
.Add<FetchPermissions>()
.Add<ChannelsSetup>()
.Add<PubSubSetup>()
.Add<CreateHelixClient>()
.Add<LoadModules>()
.Add<InitHandlers>()
.Add<StartMetrics>();
await foreach (StartupTaskState result in runner.RunAll())
if (result != StartupTaskState.Completed)
throw new NotSupportedException(result.ToString());
await Task.Delay(-1);
}
}