DiscordKit: can receive and decode hello event

This commit is contained in:
2026-03-12 09:35:23 -04:00
parent d42227ba55
commit 707bbedac2
4 changed files with 66 additions and 4 deletions

View File

@@ -9,8 +9,11 @@ public struct Bot {
public init(token: String) async throws {
client = ApiClient(token: token)
let gateway = try await client.getGatewayURL()
let gatewayURL = try await client.getGatewayURL()
print(gatewayURL.absoluteURL)
let gateway = GatewayClient(gatewayURL: gatewayURL)
try await gateway.openConnection()
print(gateway.absoluteURL)
}
}