Class WebsiteEmbed

Website Embed

Hierarchy (View Summary)

Constructors

  • Construct Video Embed

    Parameters

    • client: Client

      Client

    • embed: Omit<
          (
              | {
                  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: "Video" | "Channel" | "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" }
          ) & { type: "Website" },
          "type",
      >

      Embed

    Returns WebsiteEmbed

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: "Video" | "Channel" | "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?: string
type: "Text" | "Video" | "Image" | "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: "Video" | "Channel" | "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

      • {
            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: "Video" | "Channel" | "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 };
        }
        • Optionalcolour?: null | string

          CSS Colour

        • Optionaldescription?: null | string

          Description of website

        • Optionalicon_url?: null | string

          URL to site icon

        • Optionalimage?: null | { height: number; size: "Large" | "Preview"; url: string; width: number }

          Embedded image

        • Optionaloriginal_url?: null | string

          Original direct URL

        • Optionalsite_name?: null | string

          Site name

        • Optionalspecial?:
              | null
              | { type: "None" }
              | { type: "GIF" }
              | { id: string; timestamp?: null | string; type: "YouTube" }
              | { content_type: "Channel"; id: string; type: "Lightspeed" }
              | {
                  content_type: "Video" | "Channel" | "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" }

          Remote content

        • Optionaltitle?: null | string

          Title of website

        • type: "Website"
        • Optionalurl?: null | string

          Direct URL to web page

        • Optionalvideo?: null | { height: number; url: string; width: number }

          Embedded video

      • {
            height: number;
            size: "Large" | "Preview";
            type: "Image";
            url: string;
            width: number;
        }
        • height: number

          Format: uint

          Height of the image

        • size: "Large" | "Preview"

          Positioning and size

        • type: "Image"
        • url: string

          URL to the original image

        • width: number

          Format: uint

          Width of the image

      • { height: number; type: "Video"; url: string; width: number }
        • height: number

          Format: uint

          Height of the video

        • type: "Video"
        • url: string

          URL to the original video

        • width: number

          Format: uint

          Width of the video

      • {
            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;
        }
        • Optionalcolour?: null | string

          CSS Colour

        • Optionaldescription?: null | string

          Description of text embed

        • Optionalicon_url?: null | string

          URL to icon

        • Optionalmedia?:
              | 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;
              }

          ID of uploaded autumn file

        • Optionaltitle?: null | string

          Title of text embed

        • type: "Text"
        • Optionalurl?: null | string

          URL for title

      • { type: "None" }

    Returns MessageEmbed

    Embed