aboutsummaryrefslogtreecommitdiff
path: root/lib/s.ml
diff options
context:
space:
mode:
authorAdelyn Breelove <[email protected]>2018-12-21 09:15:32 -0700
committerAdelyn Breelove <[email protected]>2018-12-21 09:15:32 -0700
commit4abf2d536e04597650125a15a92a8835be607773 (patch)
tree7c170b3b44592fdf882a8ed37d414d619ccfc7cb /lib/s.ml
parentWorking with Discord's channel bullshit (diff)
downloaddisml-4abf2d536e04597650125a15a92a8835be607773.tar.xz
disml-4abf2d536e04597650125a15a92a8835be607773.zip
Implement most channel methods
Diffstat (limited to 'lib/s.ml')
-rw-r--r--lib/s.ml21
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/s.ml b/lib/s.ml
index 084093e..315a704 100644
--- a/lib/s.ml
+++ b/lib/s.ml
@@ -18,6 +18,25 @@ end
module type Channel = sig
type t = Channel_t.t
+ val say : content:string -> Channel_t.t -> Message_t.t Deferred.Or_error.t
+ val send_message :
+ ?embed:Yojson.Safe.json ->
+ ?content:string ->
+ ?file:string ->
+ ?tts:bool ->
+ Channel_t.t ->
+ Message_t.t Deferred.Or_error.t
+ val delete : Channel_t.t -> unit Deferred.Or_error.t
+ val get_message : id:Snowflake_t.t -> Channel_t.t -> Message_t.t Deferred.Or_error.t
+ val get_messages :
+ ?mode:[ `Before | `After | `Around ] ->
+ ?id:Snowflake_t.t ->
+ ?limit:int ->
+ Channel_t.t ->
+ Message_t.t list Deferred.Or_error.t
+ val broadcast_typing : Channel_t.t -> unit Deferred.Or_error.t
+ val get_pins : Channel_t.t -> Message_t.t list Deferred.Or_error.t
+ (* TODO more things related to guild channels *)
end
module type Embed = sig
@@ -164,7 +183,7 @@ module type Http = sig
val modify_channel :
int -> Yojson.Safe.json -> string Core.Or_error.t Conduit_async.io
val delete_channel : int -> string Core.Or_error.t Conduit_async.io
- val get_messages : int -> string Core.Or_error.t Conduit_async.io
+ val get_messages : int -> int -> string * int -> string Core.Or_error.t Conduit_async.io
val get_message : int -> int -> string Core.Or_error.t Conduit_async.io
val create_message :
int -> Yojson.Safe.json -> string Core.Or_error.t Conduit_async.io