java.lang.Object
java.lang.Record
io.github._4drian3d.jdwebhooks.Embed
Record Components:
title - the title of this embed
type - the type of this embed
description - description of this embed
url - title url
timestamp - timestamp of this embed content
color - color code of the embed
footer - footer information of this embed
image - provided image of this embed
thumbnail - provided thumbnail of this embed
video - provided video of this embed
provider - the provider of the embed
author - the author of this embed
fields - fields of this embed

public record Embed(@Nullable String title, @Nullable String type, @Nullable String description, @Nullable String url, @Nullable OffsetDateTime timestamp, @Nullable Integer color, @Nullable Embed.Footer footer, @Nullable Embed.Image image, @Nullable Embed.Thumbnail thumbnail, @Nullable Embed.Video video, @Nullable Embed.Provider provider, @Nullable Embed.Author author, @Nullable Embed.Field[] fields) extends Record
Special formatted cell that can contain various elements, such as images, links and so on.

Any param can be null

  • Constructor Details

    • Embed

      public Embed(@Nullable @Nullable String title, @Nullable @Nullable String type, @Nullable @Nullable String description, @Nullable @Nullable String url, @Nullable @Nullable OffsetDateTime timestamp, @Nullable @Nullable Integer color, @Nullable @Nullable Embed.Footer footer, @Nullable @Nullable Embed.Image image, @Nullable @Nullable Embed.Thumbnail thumbnail, @Nullable @Nullable Embed.Video video, @Nullable @Nullable Embed.Provider provider, @Nullable @Nullable Embed.Author author, @Nullable @Nullable Embed.Field[] fields)
      Creates an instance of a Embed record class.
      Parameters:
      title - the value for the title record component
      type - the value for the type record component
      description - the value for the description record component
      url - the value for the url record component
      timestamp - the value for the timestamp record component
      color - the value for the color record component
      footer - the value for the footer record component
      image - the value for the image record component
      thumbnail - the value for the thumbnail record component
      video - the value for the video record component
      provider - the value for the provider record component
      author - the value for the author record component
      fields - the value for the fields record component
  • Method Details

    • builder

      public static Embed.Builder builder()
      Creates a new Embed Builder.
      Returns:
      a new Embed builder
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • title

      @Nullable public @Nullable String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • type

      @Nullable public @Nullable String type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • description

      @Nullable public @Nullable String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • url

      @Nullable public @Nullable String url()
      Returns the value of the url record component.
      Returns:
      the value of the url record component
    • timestamp

      @Nullable public @Nullable OffsetDateTime timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component
    • color

      @Nullable public @Nullable Integer color()
      Returns the value of the color record component.
      Returns:
      the value of the color record component
    • footer

      @Nullable public @Nullable Embed.Footer footer()
      Returns the value of the footer record component.
      Returns:
      the value of the footer record component
    • image

      @Nullable public @Nullable Embed.Image image()
      Returns the value of the image record component.
      Returns:
      the value of the image record component
    • thumbnail

      @Nullable public @Nullable Embed.Thumbnail thumbnail()
      Returns the value of the thumbnail record component.
      Returns:
      the value of the thumbnail record component
    • video

      @Nullable public @Nullable Embed.Video video()
      Returns the value of the video record component.
      Returns:
      the value of the video record component
    • provider

      @Nullable public @Nullable Embed.Provider provider()
      Returns the value of the provider record component.
      Returns:
      the value of the provider record component
    • author

      @Nullable public @Nullable Embed.Author author()
      Returns the value of the author record component.
      Returns:
      the value of the author record component
    • fields

      @Nullable public @Nullable Embed.Field[] fields()
      Returns the value of the fields record component.
      Returns:
      the value of the fields record component