From 52f329dbf6d98c847697210ce219f6f1e8c6ef81 Mon Sep 17 00:00:00 2001 From: Agatha Rose Date: Thu, 11 Jun 2020 18:45:06 +0300 Subject: [PATCH] Add thumbnail field to embeds --- src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.rs b/src/main.rs index cb0f935..04a2945 100755 --- a/src/main.rs +++ b/src/main.rs @@ -262,6 +262,7 @@ fn embed(ctx: &mut Context, message: &Message, args: Args) -> CommandResult { fields: Option>, footer: Option<(String, String)>, image: Option, + thumbnail: Option, timestamp: Option, title: Option, url: Option, @@ -288,6 +289,7 @@ fn embed(ctx: &mut Context, message: &Message, args: Args) -> CommandResult { }); } + // Set embed colour unless empty if input_embed.colour.is_some() { e.color(Colour::new( u32::from_str_radix(&input_embed.colour.unwrap(), 16) @@ -321,6 +323,10 @@ fn embed(ctx: &mut Context, message: &Message, args: Args) -> CommandResult { e.image(input_embed.image.unwrap()); } + if input_embed.thumbnail.is_some() { + e.thumbnail(input_embed.thumbnail.unwrap()); + } + if input_embed.timestamp.is_some() { e.timestamp(input_embed.timestamp.unwrap()); } @@ -604,6 +610,7 @@ fn define(ctx: &mut Context, message: &Message, args: Args) -> CommandResult { def.definition.replace(|c| c == '[' || c == ']', ""), false, ) + .color(0xffd1dc) }) }); } else {