Files
zunda-bot/Sources/DiscordKit/Bot.swift
2026-03-13 10:17:41 -04:00

20 lines
434 B
Swift

import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
public struct Bot {
let client: ApiClient
public init(token: String) async throws {
client = ApiClient(token: token)
let gatewayURL = try await client.getGatewayURL()
print(gatewayURL.absoluteURL)
let gateway = GatewayClient(gatewayURL: gatewayURL)
try await gateway.openConnection()
}
}