Skip to content
This repository was archived by the owner on May 25, 2022. It is now read-only.

Commit 8eb7264

Browse files
committed
Bot now actually waits until connection before trying to update roles
1 parent 8665e9a commit 8eb7264

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: DiscordBot/Program.cs

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ public async Task StartAsync(string[] args)
5151
await _client.StartAsync();
5252
_handler = new CommandHandler();
5353
await _handler.InitializeAsync(_client);
54+
while (_client.ConnectionState != ConnectionState.Connected) {
55+
}
5456

5557
Console.WriteLine("\n");
5658
await Sheets.UpdateRoles(_client); // forces update initially on all servers

0 commit comments

Comments
 (0)