aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAdelyn Breedlove <[email protected]>2019-01-20 22:16:49 -0700
committerAdelyn Breedlove <[email protected]>2019-01-20 22:16:49 -0700
commit0a5c06034d752bae4b16e03f32bc057caa4b07a3 (patch)
tree4416440e9cf242323ae4bdb5c12f5705d87a6653 /bin
parentAdd embed builders (diff)
downloaddisml-0a5c06034d752bae4b16e03f32bc057caa4b07a3.tar.xz
disml-0a5c06034d752bae4b16e03f32bc057caa4b07a3.zip
improve embed example
Diffstat (limited to 'bin')
-rw-r--r--bin/bot.ml14
1 files changed, 13 insertions, 1 deletions
diff --git a/bin/bot.ml b/bin/bot.ml
index d0a8218..bc7a1b7 100644
--- a/bin/bot.ml
+++ b/bin/bot.ml
@@ -30,11 +30,23 @@ let check_command (msg:Message.t) =
|> Int.to_string in
Message.reply msg list >>> ignore
| "!embed" ->
+ let image_url = "https://images-ext-1.discordapp.net/external/46n5KQDNg1K4-UybFifnLsIVJkmIutfBG5zO_vpU5Zk/%3Fsize%3D1024/https/cdn.discordapp.com/avatars/345316276098433025/17ccdc992814cc6e21a9e7d743a30e37.webp" in
let embed = Embed.(default
|> title "Foo"
|> description "Bar"
+ |> url "https://gitlab.com/Mishio595/disml"
+ |> timestamp Time.(now () |> to_string_iso8601_basic ~zone:Time.Zone.utc)
|> colour 0xff
- |> field { name = "field"; value = "test"; inline = true; }
+ |> footer { Embed.default_footer with text = "boop" }
+ |> image { Embed.default_image with url = Some image_url }
+ |> thumbnail { Embed.default_image with url = Some image_url }
+ |> author { Embed.default_author with
+ name = Some "Adelyn";
+ url = Some "https://gitlab.com/Mishio595/disml";
+ icon_url = Some image_url }
+ |> field { name = "field 1"; value = "test"; inline = true; }
+ |> field { name = "field 2"; value = "test"; inline = true; }
+ |> field { name = "field 3"; value = "test"; inline = true; }
) in
Message.reply_with ~embed msg >>> ignore
| _ -> ()