DiscordKit feat: impl getGatewayURL
This commit is contained in:
16
Sources/DiscordKit/Bot.swift
Normal file
16
Sources/DiscordKit/Bot.swift
Normal file
@@ -0,0 +1,16 @@
|
||||
import Foundation
|
||||
#if canImport(FoundationNetowrking)
|
||||
import FoundationNetworking
|
||||
#endif
|
||||
|
||||
public struct Bot {
|
||||
let client: ApiClient
|
||||
|
||||
public init(token: String) async throws {
|
||||
client = ApiClient(token: token)
|
||||
|
||||
let gateway = try await client.getGatewayURL()
|
||||
|
||||
print(gateway.absoluteURL)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user