aboutsummaryrefslogtreecommitdiff
path: root/lib/models/id/guild_id_t.ml
diff options
context:
space:
mode:
authorAdelyn Breedlove <[email protected]>2019-02-11 17:23:59 +0000
committerAdelyn Breedlove <[email protected]>2019-02-11 17:23:59 +0000
commit7c9b809078b5cd53e3d54c0004c683da2ec679af (patch)
tree5a1b165b597fc1ad4167115d9a23b12852a4636b /lib/models/id/guild_id_t.ml
parentMerge branch 'sharder_fixes' into 'master' (diff)
downloaddisml-7c9b809078b5cd53e3d54c0004c683da2ec679af.tar.xz
disml-7c9b809078b5cd53e3d54c0004c683da2ec679af.zip
Add a cache
Diffstat (limited to 'lib/models/id/guild_id_t.ml')
-rw-r--r--lib/models/id/guild_id_t.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/models/id/guild_id_t.ml b/lib/models/id/guild_id_t.ml
index cd8eb58..a39c07d 100644
--- a/lib/models/id/guild_id_t.ml
+++ b/lib/models/id/guild_id_t.ml
@@ -1,5 +1,9 @@
+open Core
+
type t = [ `Guild_id of Snowflake.t ] [@@deriving sexp]
+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)