diff options
| author | Adelyn Breedlove <[email protected]> | 2019-01-19 12:54:49 -0700 |
|---|---|---|
| committer | Adelyn Breedlove <[email protected]> | 2019-01-19 12:54:49 -0700 |
| commit | cae20edc48684ad91bf2f795d59c43caead6dba7 (patch) | |
| tree | b891b0aca49ba2ccbaecfb477389e5e7b613715d /lib | |
| parent | Bump to 0.2.1 because this is chaotic (diff) | |
| download | disml-cae20edc48684ad91bf2f795d59c43caead6dba7.tar.xz disml-cae20edc48684ad91bf2f795d59c43caead6dba7.zip | |
Add docs to event dispatch
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/config.mli | 73 |
1 files changed, 70 insertions, 3 deletions
diff --git a/lib/config.mli b/lib/config.mli index 681e9ce..6f4dcef 100644 --- a/lib/config.mli +++ b/lib/config.mli @@ -1,37 +1,104 @@ -val token : string ref - +(** Fired when connecting to the gateway, most users will have no use for this. *) val hello : (Yojson.Safe.json -> unit) ref + +(** Fired when each shard receives READY from discord after identifying on the gateway. Other event dispatch is received after this. *) val ready : (Yojson.Safe.json -> unit) ref + +(** Fired after successfully reconnecting to the gateway. *) val resumed : (Yojson.Safe.json -> unit) ref + +(** Fired when Discord decides a session is invalid, much like {!Client.hello} this is not very useful for most people. *) val invalid_session : (Yojson.Safe.json -> unit) ref + +(** Fired anytime a channel is created which is visible to the bot. *) val channel_create : (Channel_t.t -> unit) ref + +(** Fired anytime a channel visible to the bot is changed. *) val channel_update : (Channel_t.t -> unit) ref + +(** Fired anytime a channel visible to the bot is deleted. *) val channel_delete : (Channel_t.t -> unit) ref + +(** Fired when messages are pinned or unpinned from a a channel. *) val channel_pins_update : (Yojson.Safe.json -> unit) ref + +(** Fired when the bot joins a guild, and during startup. *) val guild_create : (Guild_t.t -> unit) ref + +(** Fired when a guild the bot is in is edited. *) val guild_update : (Guild_t.t -> unit) ref + +(** Fired when the bot is removed from a guild. *) val guild_delete : (Guild_t.t -> unit) ref + +(** Fired when a member is banned. *) val member_ban : (Ban_t.t -> unit) ref + +(** Fired when a member is unbanned. *) val member_unban : (Ban_t.t -> unit) ref + +(** Fired when emojis are added or removed from a guild. *) val guild_emojis_update : (Yojson.Safe.json -> unit) ref + +(** Fired when a guild's integrations are updated. *) val integrations_update : (Yojson.Safe.json -> unit) ref + +(** Fired when a member joins a guild. *) val member_join : (Member_t.t -> unit) ref + +(** Fired when a member leaves a guild. Is fired alongside {!Client.member_ban} when a user is banned. *) val member_leave : (Member_t.member_wrapper -> unit) ref + +(** Fired when a member object is updated. *) val member_update : (Member_t.member_update -> unit) ref + +(** Fired when requesting guild members through {!Client.request_guild_members} *) val members_chunk : (Member_t.t list -> unit) ref + +(** Fired when a role is created. *) val role_create : (Role_t.t -> unit) ref + +(** Fired when a role is edited. *) val role_update : (Role_t.t -> unit) ref + +(** Fired when a role is deleted. *) val role_delete : (Role_t.t -> unit) ref + +(** Fired when a message is sent. *) val message_create : (Message_t.t -> unit) ref + +(** Fired when a message is edited. This does not necessarily mean the content changed. *) val message_update : (Message_t.message_update -> unit) ref + +(** Fired when a message is deleted. *) val message_delete : (Snowflake.t -> Snowflake.t -> unit) ref + +(** Fired when messages are bulk deleted. *) val message_bulk_delete : (Snowflake.t list -> unit) ref + +(** Fired when a rection is added to a message. *) val reaction_add : (Reaction_t.reaction_event -> unit) ref + +(** Fired when a reaction is removed from a message. *) val reaction_remove : (Reaction_t.reaction_event -> unit) ref + +(** Fired when all reactions are cleared from a message. *) val reaction_bulk_remove : (Reaction_t.t list -> unit) ref + +(** Fired when a user updates their presence. *) val presence_update : (Presence.t -> unit) ref + +(** Fired when a typing indicator is displayed. *) val typing_start : (Yojson.Safe.json -> unit) ref + +(** Fired when the current user is updated. You most likely want {!Client.member_update} or {!Client.presence_update} instead. *) val user_update : (Yojson.Safe.json -> unit) ref + +(**/**) val voice_state_update : (Yojson.Safe.json -> unit) ref val voice_server_update : (Yojson.Safe.json -> unit) ref -val webhooks_update : (Yojson.Safe.json -> unit) ref
\ No newline at end of file +val webhooks_update : (Yojson.Safe.json -> unit) ref +(**/**) + +(**/**) +val token : string ref
\ No newline at end of file |