remove DiscordBM dependency

This commit is contained in:
2026-03-17 06:33:26 -04:00
parent c6b92d968a
commit 29a2b0370b
9 changed files with 361 additions and 370 deletions

View File

@@ -23,6 +23,8 @@ public enum GatewayPayload: Decodable {
public struct GatewayMessage: Decodable {
let op: Int
let d: GatewayPayload?
let s: Int?
let t: String?
enum CodingKeys: String, CodingKey {
case t
@@ -34,6 +36,8 @@ public struct GatewayMessage: Decodable {
public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
op = try container.decode(Int.self, forKey: .op)
s = try container.decode(Int?.self, forKey: .s)
t = try container.decode(String?.self, forKey: .t)
switch op {
case 10:
let hello = try container.decode(HelloPayload.self, forKey: .d)