diff options
Diffstat (limited to 'lib/models/id/guild_id_t.ml')
| -rw-r--r-- | lib/models/id/guild_id_t.ml | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/models/id/guild_id_t.ml b/lib/models/id/guild_id_t.ml index a39c07d..6fc3777 100644 --- a/lib/models/id/guild_id_t.ml +++ b/lib/models/id/guild_id_t.ml @@ -1,15 +1,7 @@ open Core
-type t = [ `Guild_id of Snowflake.t ] [@@deriving sexp]
+type t = [ `Guild_id of Snowflake.t ] [@@deriving sexp, yojson]
-let compare (`Guild_id t) (`Guild_id t') = Int.compare t t'
-
-let of_yojson a : (t, string) result =
- match Snowflake.of_yojson a with
- | Ok id -> Ok (`Guild_id id)
- | Error err -> Error err
-
-let of_yojson_exn a : t = `Guild_id (Snowflake.of_yojson_exn a)
-let to_yojson (`Guild_id id) = (Snowflake.to_yojson id)
+let compare (`Guild_id t) (`Guild_id t') = Int64.compare t t'
let get_id (`Guild_id id) = id
\ No newline at end of file |