aboutsummaryrefslogtreecommitdiff
path: root/lib/models/guild/guild_t.ml
diff options
context:
space:
mode:
authorAdelyn Breedlove <[email protected]>2019-01-28 10:31:51 -0700
committerAdelyn Breedlove <[email protected]>2019-01-28 10:31:51 -0700
commit8662e92987c437f59d09896a247ec2b5d82c4528 (patch)
treef004cc14598351d4ad6b19d8e993d2f629c5e738 /lib/models/guild/guild_t.ml
parentAdd more docs (diff)
downloaddisml-8662e92987c437f59d09896a247ec2b5d82c4528.tar.xz
disml-8662e92987c437f59d09896a247ec2b5d82c4528.zip
Publish docs updates
Diffstat (limited to 'lib/models/guild/guild_t.ml')
-rw-r--r--lib/models/guild/guild_t.ml142
1 files changed, 71 insertions, 71 deletions
diff --git a/lib/models/guild/guild_t.ml b/lib/models/guild/guild_t.ml
index fa62a8f..9ad7cb9 100644
--- a/lib/models/guild/guild_t.ml
+++ b/lib/models/guild/guild_t.ml
@@ -1,72 +1,72 @@
-open Core
-
-type unavailable = {
- id: Guild_id_t.t;
-} [@@deriving sexp, yojson { strict = false }]
-
-type pre = {
- id: Guild_id_t.t;
- name: string;
- icon: string option [@default None];
- splash: string option [@default None];
- owner_id: User_id_t.t;
- region: string;
- afk_channel_id: Channel_id_t.t option [@default None];
- afk_timeout: int;
- embed_enabled: bool [@default false];
- embed_channel_id: Channel_id_t.t option [@default None];
- verification_level: int;
- default_message_notifications: int;
- explicit_content_filter: int;
- roles: Role_t.role list;
- emojis: Emoji.t list;
- features: string list;
- mfa_level: int;
- application_id: Snowflake.t option [@default None];
- widget_enabled: bool [@default false];
- widget_channel_id: Channel_id_t.t option [@default None];
- system_channel_id: Channel_id_t.t option [@default None];
- large: bool;
- unavailable: bool;
- member_count: int option [@default None];
- members: Member_t.member list;
- channels: Channel_t.channel_wrapper list;
-} [@@deriving sexp, yojson { strict = false }]
-
-type t = {
- id: Guild_id_t.t;
- name: string;
- icon: string option [@default None];
- splash: string option [@default None];
- owner_id: User_id_t.t;
- region: string;
- afk_channel_id: Channel_id_t.t option [@default None];
- afk_timeout: int;
- embed_enabled: bool [@default false];
- embed_channel_id: Channel_id_t.t option [@default None];
- verification_level: int;
- default_message_notifications: int;
- explicit_content_filter: int;
- roles: Role_t.t list;
- emojis: Emoji.t list;
- features: string list;
- mfa_level: int;
- application_id: Snowflake.t option [@default None];
- widget_enabled: bool [@default false];
- widget_channel_id: Channel_id_t.t option [@default None];
- system_channel_id: Channel_id_t.t option [@default None];
- large: bool;
- unavailable: bool;
- member_count: int option [@default None];
- members: Member_t.t list;
- channels: Channel_t.t list;
-} [@@deriving sexp, yojson { strict = false }]
-
-let wrap ({id;name;icon;splash;owner_id;region;afk_channel_id;afk_timeout;embed_enabled;embed_channel_id;verification_level;default_message_notifications;explicit_content_filter;roles;emojis;features;mfa_level;application_id;widget_enabled;widget_channel_id;system_channel_id;large;unavailable;member_count;members;channels}:pre) =
- let `Guild_id id = id in
- let roles = List.map ~f:(Role_t.wrap ~guild_id:id) roles in
- let members = List.map ~f:(Member_t.wrap ~guild_id:id) members in
- let channels = List.map ~f:Channel_t.wrap channels in
- {id = `Guild_id id;name;icon;splash;owner_id;region;afk_channel_id;afk_timeout;embed_enabled;embed_channel_id;verification_level;default_message_notifications;explicit_content_filter;roles;emojis;features;mfa_level;application_id;widget_enabled;widget_channel_id;system_channel_id;large;unavailable;member_count;members;channels}
-
+open Core
+
+type unavailable = {
+ id: Guild_id_t.t;
+} [@@deriving sexp, yojson { strict = false }]
+
+type pre = {
+ id: Guild_id_t.t;
+ name: string;
+ icon: string option [@default None];
+ splash: string option [@default None];
+ owner_id: User_id_t.t;
+ region: string;
+ afk_channel_id: Channel_id_t.t option [@default None];
+ afk_timeout: int;
+ embed_enabled: bool [@default false];
+ embed_channel_id: Channel_id_t.t option [@default None];
+ verification_level: int;
+ default_message_notifications: int;
+ explicit_content_filter: int;
+ roles: Role_t.role list;
+ emojis: Emoji.t list;
+ features: string list;
+ mfa_level: int;
+ application_id: Snowflake.t option [@default None];
+ widget_enabled: bool [@default false];
+ widget_channel_id: Channel_id_t.t option [@default None];
+ system_channel_id: Channel_id_t.t option [@default None];
+ large: bool;
+ unavailable: bool;
+ member_count: int option [@default None];
+ members: Member_t.member list;
+ channels: Channel_t.channel_wrapper list;
+} [@@deriving sexp, yojson { strict = false }]
+
+type t = {
+ id: Guild_id_t.t;
+ name: string;
+ icon: string option [@default None];
+ splash: string option [@default None];
+ owner_id: User_id_t.t;
+ region: string;
+ afk_channel_id: Channel_id_t.t option [@default None];
+ afk_timeout: int;
+ embed_enabled: bool [@default false];
+ embed_channel_id: Channel_id_t.t option [@default None];
+ verification_level: int;
+ default_message_notifications: int;
+ explicit_content_filter: int;
+ roles: Role_t.t list;
+ emojis: Emoji.t list;
+ features: string list;
+ mfa_level: int;
+ application_id: Snowflake.t option [@default None];
+ widget_enabled: bool [@default false];
+ widget_channel_id: Channel_id_t.t option [@default None];
+ system_channel_id: Channel_id_t.t option [@default None];
+ large: bool;
+ unavailable: bool;
+ member_count: int option [@default None];
+ members: Member_t.t list;
+ channels: Channel_t.t list;
+} [@@deriving sexp, yojson { strict = false }]
+
+let wrap ({id;name;icon;splash;owner_id;region;afk_channel_id;afk_timeout;embed_enabled;embed_channel_id;verification_level;default_message_notifications;explicit_content_filter;roles;emojis;features;mfa_level;application_id;widget_enabled;widget_channel_id;system_channel_id;large;unavailable;member_count;members;channels}:pre) =
+ let `Guild_id id = id in
+ let roles = List.map ~f:(Role_t.wrap ~guild_id:id) roles in
+ let members = List.map ~f:(Member_t.wrap ~guild_id:id) members in
+ let channels = List.map ~f:Channel_t.wrap channels in
+ {id = `Guild_id id;name;icon;splash;owner_id;region;afk_channel_id;afk_timeout;embed_enabled;embed_channel_id;verification_level;default_message_notifications;explicit_content_filter;roles;emojis;features;mfa_level;application_id;widget_enabled;widget_channel_id;system_channel_id;large;unavailable;member_count;members;channels}
+
let get_id guild = let `Guild_id id = guild.id in id \ No newline at end of file