Interface JSONMessage

interface JSONMessage {
    channelID: string;
    content: null | string;
    createdAt: Date;
    deletedAt: null | Date;
    editedTimestamp: null | Date;
    embeds?:
        | []
        | {
            author?: { icon_url?: string; name?: string; url?: string };
            color?: number;
            description?: string;
            fields?: { inline: boolean; name: string; value: string }[];
            footer?: { icon_url?: string; text: string };
            image?: { url?: string };
            thumbnail?: { url?: string };
            timestamp?: string;
            title?: string;
            url?: string;
        }[];
    guildID: null
    | string;
    hiddenLinkPreviewUrls?: string[];
    id: string;
    isPrivate: boolean;
    isSilent: boolean;
    memberID: string;
    mentions:
        | null
        | {
            channels?: { id: string }[];
            everyone?: boolean;
            here?: boolean;
            roles?: { id: number }[];
            users?: { id: string }[];
        };
    replyMessageIds: string[];
    type: string;
    webhookID?: null
    | string;
}

Hierarchy (View Summary)

Properties

channelID: string

ID of the channel on which the message was sent.

content: null | string

Content of the message.

createdAt: Date

When the message was created.

deletedAt: null | Date

When the message was deleted.

editedTimestamp: null | Date

Timestamp at which this message was last edited.

embeds?:
    | []
    | {
        author?: { icon_url?: string; name?: string; url?: string };
        color?: number;
        description?: string;
        fields?: { inline: boolean; name: string; value: string }[];
        footer?: { icon_url?: string; text: string };
        image?: { url?: string };
        thumbnail?: { url?: string };
        timestamp?: string;
        title?: string;
        url?: string;
    }[]

Array of message embed.

Type declaration

  • []
  • {
        author?: { icon_url?: string; name?: string; url?: string };
        color?: number;
        description?: string;
        fields?: { inline: boolean; name: string; value: string }[];
        footer?: { icon_url?: string; text: string };
        image?: { url?: string };
        thumbnail?: { url?: string };
        timestamp?: string;
        title?: string;
        url?: string;
    }[]
    • Optionalauthor?: { icon_url?: string; name?: string; url?: string }

      A small section above the title of the embed

      • Optionalicon_url?: string

        Format: media-uri

        URL of a small image to display to the left of the author's name

      • Optionalname?: string

        Name of the author

      • Optionalurl?: string

        Format: uri

        URL to linkify the author's name field

    • Optionalcolor?: number

      The integer value corresponds to the decimal RGB representation for the color. The color that the left border should be

    • Optionaldescription?: string

      Format: webhook-markdown

      Subtext of the embed

    • Optionalfields?: { inline: boolean; name: string; value: string }[]

      Table-like cells to add to the embed

    • Optionalfooter?: { icon_url?: string; text: string }

      A small section at the bottom of the embed

      • Optionalicon_url?: string

        Format: media-uri

        URL of a small image to put in the footer

      • text: string

        Text of the footer

    • Optionalimage?: { url?: string }

      The main picture to associate with the embed

      • Optionalurl?: string

        Format: media-uri

        URL of the image

    • Optionalthumbnail?: { url?: string }

      An image to the right of the embed's content

      • Optionalurl?: string

        Format: media-uri

        URL of the image

    • Optionaltimestamp?: string

      Format: date-time

      A timestamp to put in the footer

    • Optionaltitle?: string

      Format: webhook-markdown

      Main header of the embed

    • Optionalurl?: string

      Format: uri

      URL to linkify the title field with

guildID: null | string

ID of the server on which the message was sent.

hiddenLinkPreviewUrls?: string[]
id: string
isPrivate: boolean

If true, the message appears as private.

isSilent: boolean

If true, the message didn't mention anyone.

memberID: string

ID of the message author.

mentions:
    | null
    | {
        channels?: { id: string }[];
        everyone?: boolean;
        here?: boolean;
        roles?: { id: number }[];
        users?: { id: string }[];
    }

object containing all mentioned users.

Type declaration

  • null
  • {
        channels?: { id: string }[];
        everyone?: boolean;
        here?: boolean;
        roles?: { id: number }[];
        users?: { id: string }[];
    }
    • Optionalchannels?: { id: string }[]

      Channels

      Info on mentioned channels

    • Optionaleveryone?: boolean

      Everyone

      If

      was mentioned

    • Optionalhere?: boolean

      Here

      If

      was mentioned

    • Optionalroles?: { id: number }[]

      Roles

      Info on mentioned roles

    • Optionalusers?: { id: string }[]

      Users

      Info on mentioned users

replyMessageIds: string[]

The IDs of the message replied by the message.

type: string

Message type.

webhookID?: null | string

ID of the webhook used to send this message. (if sent by a webhook)