forked from sorceress/rustcord
Add thumbnail field to embeds
This commit is contained in:
parent
3540aff172
commit
52f329dbf6
|
@ -262,6 +262,7 @@ fn embed(ctx: &mut Context, message: &Message, args: Args) -> CommandResult {
|
|||
fields: Option<Vec<(String, String, bool)>>,
|
||||
footer: Option<(String, String)>,
|
||||
image: Option<String>,
|
||||
thumbnail: Option<String>,
|
||||
timestamp: Option<String>,
|
||||
title: Option<String>,
|
||||
url: Option<String>,
|
||||
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue