Skip to content
This repository has been archived by the owner on Jun 5, 2022. It is now read-only.
/ embed-builder Public archive

Archived embed builder for the Twilight ecosystem. Use the twilight-util crate instead.

License

Notifications You must be signed in to change notification settings

twilight-rs/embed-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twilight-embed-builder

codecov badge discord badge github badge license badge rust badge

This crate has been archived. Please use twilight-util instead.

twilight-embed-builder is a set of builder for the twilight-rs ecosystem to create a message embed, useful when creating or updating messages.

Examples

Build a simple embed:

use twilight_embed_builder::{EmbedBuilder, EmbedFieldBuilder};

let embed = EmbedBuilder::new()
    .description("Here's a list of reasons why Twilight is the best pony:")
    .field(EmbedFieldBuilder::new("Wings", "She has wings.").inline())
    .field(EmbedFieldBuilder::new("Horn", "She can do magic, and she's really good at it.").inline())
    .build()?;

Build an embed with an image:

use twilight_embed_builder::{EmbedBuilder, ImageSource};

let embed = EmbedBuilder::new()
    .description("Here's a cool image of Twilight Sparkle")
    .image(ImageSource::attachment("bestpony.png")?)
    .build()?;

About

Archived embed builder for the Twilight ecosystem. Use the twilight-util crate instead.

Resources

License

Stars

Watchers

Forks

Languages