Class WebsiteEmbed

Website Embed

Hierarchy

Constructors

Properties

client?: Client
colour?: string
description?: string
iconUrl?: string
image?: ImageEmbed
originalUrl?: string
siteName?: string
specialContent?: {
    type: "None";
} | {
    type: "GIF";
} | {
    id: string;
    timestamp?: null | string;
    type: "YouTube";
} | {
    content_type: "Channel";
    id: string;
    type: "Lightspeed";
} | {
    content_type: "Channel" | "Video" | "Clip";
    id: string;
    type: "Twitch";
} | {
    content_type: string;
    id: string;
    type: "Spotify";
} | {
    type: "Soundcloud";
} | {
    content_type: "Album" | "Track";
    id: string;
    type: "Bandcamp";
} | {
    album_id: string;
    track_id?: null | string;
    type: "AppleMusic";
} | {
    id: string;
    type: "Streamable";
}

Type declaration

  • type: "None"

Type declaration

  • type: "GIF"

Type declaration

  • id: string
  • Optional timestamp?: null | string
  • type: "YouTube"

Type declaration

  • content_type: "Channel"
  • id: string
  • type: "Lightspeed"

Type declaration

  • content_type: "Channel" | "Video" | "Clip"
  • id: string
  • type: "Twitch"

Type declaration

  • content_type: string
  • id: string
  • type: "Spotify"

Type declaration

  • type: "Soundcloud"

Type declaration

  • content_type: "Album" | "Track"
  • id: string
  • type: "Bandcamp"

Type declaration

  • album_id: string
  • Optional track_id?: null | string
  • type: "AppleMusic"

Type declaration

  • id: string
  • type: "Streamable"
title?: string
type: "Text" | "Image" | "Video" | "Website" | "None"
url?: string
video?: VideoEmbed

Accessors

  • get embedURL(): undefined | string
  • If special content is present, generate the embed URL

    Returns undefined | string

Methods

  • Create an Embed from an API Embed

    Parameters

    • client: Client

      Client

    • embed: {
          colour?: null | string;
          description?: null | string;
          icon_url?: null | string;
          image?: null | {
              height: number;
              size: "Large" | "Preview";
              url: string;
              width: number;
          };
          original_url?: null | string;
          site_name?: null | string;
          special?: null | {
              type: "None";
          } | {
              type: "GIF";
          } | {
              id: string;
              timestamp?: null | string;
              type: "YouTube";
          } | {
              content_type: "Channel";
              id: string;
              type: "Lightspeed";
          } | {
              content_type: "Channel" | "Video" | "Clip";
              id: string;
              type: "Twitch";
          } | {
              content_type: string;
              id: string;
              type: "Spotify";
          } | {
              type: "Soundcloud";
          } | {
              content_type: "Album" | "Track";
              id: string;
              type: "Bandcamp";
          } | {
              album_id: string;
              track_id?: null | string;
              type: "AppleMusic";
          } | {
              id: string;
              type: "Streamable";
          };
          title?: null | string;
          type: "Website";
          url?: null | string;
          video?: null | {
              height: number;
              url: string;
              width: number;
          };
      } | {
          height: number;
          size: "Large" | "Preview";
          type: "Image";
          url: string;
          width: number;
      } | {
          height: number;
          type: "Video";
          url: string;
          width: number;
      } | {
          colour?: null | string;
          description?: null | string;
          icon_url?: null | string;
          media?: null | {
              _id: string;
              content_type: string;
              deleted?: null | boolean;
              filename: string;
              message_id?: null | string;
              metadata: {
                  type: "File";
              } | {
                  type: "Text";
              } | {
                  height: number;
                  type: "Image";
                  width: number;
              } | {
                  height: number;
                  type: "Video";
                  width: number;
              } | {
                  type: "Audio";
              };
              object_id?: null | string;
              reported?: null | boolean;
              server_id?: null | string;
              size: number;
              tag: string;
              user_id?: null | string;
          };
          title?: null | string;
          type: "Text";
          url?: null | string;
      } | {
          type: "None";
      }

      Data

    Returns MessageEmbed

    Embed

Generated using TypeDoc