aboutsummaryrefslogtreecommitdiff
path: root/docs/disml/Disml__Message/index.html
blob: dd06c8798d8c56dc14332400975cbc7619ca4034 (plain) (blame)
1
2
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Disml__Message (disml.Disml__Message)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a><a href="../index.html">disml</a> &#x00BB; Disml__Message</nav><h1>Module <code>Disml__Message</code></h1></header><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include </span><span class="keyword">module type of </span><a href="../Disml__/index.html#module-Message_t">Disml__.Message_t</a></code></span></summary><aside></aside><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type </span>t</code><code><span class="keyword"> = </span></code><code>{</code><table class="record"><tr id="type-t.id" class="anchored"><td class="def field"><a href="#type-t.id" class="anchor"></a><code>id : <a href="../Disml__/Message_id/index.html#type-t">Disml__.Message_id.t</a>;</code></td><td class="doc"><p>Snowflake ID of the message.</p></td></tr><tr id="type-t.author" class="anchored"><td class="def field"><a href="#type-t.author" class="anchor"></a><code>author : <a href="../Disml__/User_t/index.html#type-t">Disml__.User_t.t</a>;</code></td><td class="doc"><p>User that authored the message.</p></td></tr><tr id="type-t.channel_id" class="anchored"><td class="def field"><a href="#type-t.channel_id" class="anchor"></a><code>channel_id : <a href="../Disml__/Channel_id_t/index.html#type-t">Disml__.Channel_id_t.t</a>;</code></td><td class="doc"><p>Channel ID the message exists in.</p></td></tr><tr id="type-t.member" class="anchored"><td class="def field"><a href="#type-t.member" class="anchor"></a><code>member : <a href="../Disml__/Member_t/index.html#type-partial_member">Disml__.Member_t.partial_member</a> option;</code></td><td class="doc"><p>A partial member if the message was sent in a guild.</p></td></tr><tr id="type-t.guild_id" class="anchored"><td class="def field"><a href="#type-t.guild_id" class="anchor"></a><code>guild_id : <a href="../Disml__/Guild_id_t/index.html#type-t">Disml__.Guild_id_t.t</a> option;</code></td><td class="doc"><p>Guild ID if the message was sent in a guild.</p></td></tr><tr id="type-t.content" class="anchored"><td class="def field"><a href="#type-t.content" class="anchor"></a><code>content : string;</code></td><td class="doc"><p>Content of the message.</p></td></tr><tr id="type-t.timestamp" class="anchored"><td class="def field"><a href="#type-t.timestamp" class="anchor"></a><code>timestamp : string;</code></td><td class="doc"><p>ISO8601 timestamp of when the message was created.</p></td></tr><tr id="type-t.edited_timestamp" class="anchored"><td class="def field"><a href="#type-t.edited_timestamp" class="anchor"></a><code>edited_timestamp : string option;</code></td><td class="doc"><p>Like timestamp, but for last edit, if any.</p></td></tr><tr id="type-t.tts" class="anchored"><td class="def field"><a href="#type-t.tts" class="anchor"></a><code>tts : bool;</code></td><td class="doc"><p>Whether the message used text-to-speech.</p></td></tr><tr id="type-t.mention_everyone" class="anchored"><td class="def field"><a href="#type-t.mention_everyone" class="anchor"></a><code>mention_everyone : bool;</code></td><td class="doc"><p>Whether the message mentioned <code>@everyone</code> or <code>@here</code></p></td></tr><tr id="type-t.mentions" class="anchored"><td class="def field"><a href="#type-t.mentions" class="anchor"></a><code>mentions : <a href="../Disml__/User_t/index.html#type-t">Disml__.User_t.t</a> list;</code></td><td class="doc"><p>A List of users that were mentioned in the message.</p></td></tr><tr id="type-t.mention_roles" class="anchored"><td class="def field"><a href="#type-t.mention_roles" class="anchor"></a><code>mention_roles : <a href="../Disml__/Role_id/index.html#type-t">Disml__.Role_id.t</a> list;</code></td><td class="doc"><p>A list of roles that were mentioned in the message.</p></td></tr><tr id="type-t.attachments" class="anchored"><td class="def field"><a href="#type-t.attachments" class="anchor"></a><code>attachments : <a href="../Disml__/Attachment/index.html#type-t">Disml__.Attachment.t</a> list;</code></td><td class="doc"><p>A list of attachments.</p></td></tr><tr id="type-t.embeds" class="anchored"><td class="def field"><a href="#type-t.embeds" class="anchor"></a><code>embeds : <a href="../Disml__/Embed/index.html#type-t">Disml__.Embed.t</a> list;</code></td><td class="doc"><p>A List of embeds on the message.</p></td></tr><tr id="type-t.reactions" class="anchored"><td class="def field"><a href="#type-t.reactions" class="anchor"></a><code>reactions : <a href="../Disml__/Snowflake/index.html#type-t">Disml__.Snowflake.t</a> list;</code></td><td class="doc"><p>A list of reactions.</p></td></tr><tr id="type-t.nonce" class="anchored"><td class="def field"><a href="#type-t.nonce" class="anchor"></a><code>nonce : <a href="../Disml__/Snowflake/index.html#type-t">Disml__.Snowflake.t</a> option;</code></td><td class="doc"><p>Used in verification, safe to ignore.</p></td></tr><tr id="type-t.pinned" class="anchored"><td class="def field"><a href="#type-t.pinned" class="anchor"></a><code>pinned : bool;</code></td><td class="doc"><p>Whether the message is pinned.</p></td></tr><tr id="type-t.webhook_id" class="anchored"><td class="def field"><a href="#type-t.webhook_id" class="anchor"></a><code>webhook_id : <a href="../Disml__/Snowflake/index.html#type-t">Disml__.Snowflake.t</a> option;</code></td><td class="doc"><p>The webhook ID, if the message was sent by a webhook.</p></td></tr><tr id="type-t.kind" class="anchored"><td class="def field"><a href="#type-t.kind" class="anchor"></a><code>kind : int;</code></td><td class="doc"><p>See <a href="https://discordapp.com/developers/docs/resources/channel#message-object-message-types">the discord docs</a> for message type enumeration.</p></td></tr></table><code>}</code></dt><dd><p>Represents a message object.</p></dd></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-t_of_sexp"><a href="#val-t_of_sexp" class="anchor"></a><code><span class="keyword">val </span>t_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-sexp_of_t"><a href="#val-sexp_of_t" class="anchor"></a><code><span class="keyword">val </span>sexp_of_t : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> Ppx_sexp_conv_lib.Sexp.t</code></dt></dl></div></div></div><dl><dt class="spec value" id="val-to_yojson"><a href="#val-to_yojson" class="anchor"></a><code><span class="keyword">val </span>to_yojson : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> Yojson.Safe.json</code></dt><dt class="spec value" id="val-of_yojson"><a href="#val-of_yojson" class="anchor"></a><code><span class="keyword">val </span>of_yojson : Yojson.Safe.json <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> Ppx_deriving_yojson_runtime.error_or</code></dt><dt class="spec value" id="val-of_yojson_exn"><a href="#val-of_yojson_exn" class="anchor"></a><code><span class="keyword">val </span>of_yojson_exn : Yojson.Safe.json <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt></dl></details></div></div></div><dl><dt class="spec value" id="val-add_reaction"><a href="#val-add_reaction" class="anchor"></a><code><span class="keyword">val </span>add_reaction : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../Disml__/Emoji/index.html#type-t">Disml__.Emoji.t</a> <span>&#45;&gt;</span> unit Async.Deferred.Or_error.t</code></dt><dd><p>Add the given emoji as a reaction.</p></dd></dl><dl><dt class="spec value" id="val-remove_reaction"><a href="#val-remove_reaction" class="anchor"></a><code><span class="keyword">val </span>remove_reaction : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../Disml__/Emoji/index.html#type-t">Disml__.Emoji.t</a> <span>&#45;&gt;</span> <a href="../Disml__/User_t/index.html#type-t">Disml__.User_t.t</a> <span>&#45;&gt;</span> unit Async.Deferred.Or_error.t</code></dt><dd><p>Remove the reaction. Must also specify the user.</p></dd></dl><dl><dt class="spec value" id="val-clear_reactions"><a href="#val-clear_reactions" class="anchor"></a><code><span class="keyword">val </span>clear_reactions : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit Async.Deferred.Or_error.t</code></dt><dd><p>Remove all reactions from the message.</p></dd></dl><dl><dt class="spec value" id="val-delete"><a href="#val-delete" class="anchor"></a><code><span class="keyword">val </span>delete : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit Async.Deferred.Or_error.t</code></dt><dd><p>Delete the message.</p></dd></dl><dl><dt class="spec value" id="val-pin"><a href="#val-pin" class="anchor"></a><code><span class="keyword">val </span>pin : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit Async.Deferred.Or_error.t</code></dt><dd><p>Pin the message.</p></dd></dl><dl><dt class="spec value" id="val-unpin"><a href="#val-unpin" class="anchor"></a><code><span class="keyword">val </span>unpin : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit Async.Deferred.Or_error.t</code></dt><dd><p>Unping the message.</p></dd></dl><dl><dt class="spec value" id="val-reply"><a href="#val-reply" class="anchor"></a><code><span class="keyword">val </span>reply : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> Async.Deferred.Or_error.t</code></dt><dd><p>Sugar for <code>Channel_id.say msg.channel_id content</code>.</p></dd></dl><dl><dt class="spec value" id="val-reply_with"><a href="#val-reply_with" class="anchor"></a><code><span class="keyword">val </span>reply_with : ?&#8288;embed:<a href="../Disml__/Embed/index.html#type-t">Disml__.Embed.t</a> <span>&#45;&gt;</span> ?&#8288;content:string <span>&#45;&gt;</span> ?&#8288;file:string <span>&#45;&gt;</span> ?&#8288;tts:bool <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../Disml__/Message_t/index.html#type-t">Disml__.Message_t.t</a> Async.Deferred.Or_error.t</code></dt><dd><p>Sugar for <code>Channel_id.send_message ?embed ?content ?file ?tts msg.channel_id</code>.</p></dd></dl><dl><dt class="spec value" id="val-set_content"><a href="#val-set_content" class="anchor"></a><code><span class="keyword">val </span>set_content : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> Async.Deferred.Or_error.t</code></dt><dd><p>Set the content of the message.</p></dd></dl><dl><dt class="spec value" id="val-set_embed"><a href="#val-set_embed" class="anchor"></a><code><span class="keyword">val </span>set_embed : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../Disml__/Embed/index.html#type-t">Disml__.Embed.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> Async.Deferred.Or_error.t</code></dt><dd><p>Set the embed of the message.</p></dd></dl></div></body></html>