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 full)

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.

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

  • 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)