diff options
| author | Adelyn Breelove <[email protected]> | 2019-01-21 08:52:33 -0700 |
|---|---|---|
| committer | Adelyn Breelove <[email protected]> | 2019-01-21 08:52:33 -0700 |
| commit | c3d6e15bb89d4a93a2fa486db6c8e126baf4da2e (patch) | |
| tree | 3fe6679ff4520899bab9ab9fb96145efd614a3a3 /lib/models/guild/role_t.ml | |
| parent | swap order of fields in example bot to reflect correct ordering (diff) | |
| download | disml-c3d6e15bb89d4a93a2fa486db6c8e126baf4da2e.tar.xz disml-c3d6e15bb89d4a93a2fa486db6c8e126baf4da2e.zip | |
folder restructure
Diffstat (limited to 'lib/models/guild/role_t.ml')
| -rw-r--r-- | lib/models/guild/role_t.ml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/models/guild/role_t.ml b/lib/models/guild/role_t.ml new file mode 100644 index 0000000..e41f31d --- /dev/null +++ b/lib/models/guild/role_t.ml @@ -0,0 +1,32 @@ +open Core + +type role = { + id: Snowflake.t; + name: string; + colour: int [@key "color"]; + hoist: bool; + position: int; + permissions: int; + managed: bool; + mentionable: bool; +} [@@deriving sexp, yojson { strict = false}] + +type role_update = { + role: role; + guild_id: Snowflake.t; +} [@@deriving sexp, yojson { strict = false}] + +type t = { + id: Snowflake.t; + name: string; + colour: int [@key "color"]; + hoist: bool; + position: int; + permissions: int; + managed: bool; + mentionable: bool; + guild_id: Snowflake.t; +} [@@deriving sexp, yojson { strict = false}] + +let wrap ~guild_id ({id;name;colour;hoist;position;permissions;managed;mentionable}:role) = + {id;name;colour;hoist;position;permissions;managed;mentionable;guild_id}
\ No newline at end of file |