Interface JSONMessage

interface JSONMessage {
    activity?: MessageActivity;
    applicationID?: string;
    attachments: JSONAttachment[];
    author: JSONUser;
    channelID: string;
    components?: MessageActionRow[];
    content: string;
    createdAt: number;
    editedTimestamp: null | number;
    embeds: Embed[];
    flags?: number;
    guildID?: string;
    id: string;
    interaction?: {
        id: string;
        member?: JSONMember;
        name: string;
        type: InteractionTypes;
        user: JSONUser;
    };
    interactionMetadata?: {
        authorizingIntegrationOwners: AuthorizingIntegrationOwners;
        id: string;
        interactedMessageID?: string;
        name?: string;
        originalResponseMessageID?: string;
        triggeringInteractionMetadata?: {
            authorizingIntegrationOwners: AuthorizingIntegrationOwners;
            id: string;
            interactedMessageID?: string;
            originalResponseMessageID?: string;
            type: InteractionTypes;
            user: JSONUser;
        };
        type: InteractionTypes;
        user: JSONUser;
    };
    mentionChannels?: ChannelMention[];
    mentions: {
        channels: string[];
        everyone: boolean;
        members: JSONMember[];
        roles: string[];
        users: JSONUser[];
    };
    messageReference?: MessageReference;
    messageSnapshots?: {
        message: {
            attachments: JSONAttachment[];
            content: string;
            editedTimestamp: null | number;
            embeds: Embed[];
            flags: number;
            mentions: {
                channels: string[];
                roles: string[];
                users: JSONUser[];
            };
            timestamp: number;
            type: MessageTypes;
        };
    }[];
    nonce?: string | number;
    pinned: boolean;
    position?: number;
    reactions: MessageReaction[];
    referencedMessage?: null | JSONMessage;
    stickerItems?: StickerItem[];
    thread?: JSONPublicThreadChannel | JSONAnnouncementThreadChannel | JSONPrivateThreadChannel;
    timestamp: number;
    tts: boolean;
    type: MessageTypes;
    webhook?: string;
}

Hierarchy (view full)

Properties

activity?: MessageActivity
applicationID?: string
attachments: JSONAttachment[]
author: JSONUser
channelID: string
components?: MessageActionRow[]
content: string
createdAt: number
editedTimestamp: null | number
embeds: Embed[]
flags?: number
guildID?: string
id: string
interaction?: {
    id: string;
    member?: JSONMember;
    name: string;
    type: InteractionTypes;
    user: JSONUser;
}

Type declaration

interactionMetadata?: {
    authorizingIntegrationOwners: AuthorizingIntegrationOwners;
    id: string;
    interactedMessageID?: string;
    name?: string;
    originalResponseMessageID?: string;
    triggeringInteractionMetadata?: {
        authorizingIntegrationOwners: AuthorizingIntegrationOwners;
        id: string;
        interactedMessageID?: string;
        originalResponseMessageID?: string;
        type: InteractionTypes;
        user: JSONUser;
    };
    type: InteractionTypes;
    user: JSONUser;
}

Type declaration

mentionChannels?: ChannelMention[]
mentions: {
    channels: string[];
    everyone: boolean;
    members: JSONMember[];
    roles: string[];
    users: JSONUser[];
}

Type declaration

messageReference?: MessageReference
messageSnapshots?: {
    message: {
        attachments: JSONAttachment[];
        content: string;
        editedTimestamp: null | number;
        embeds: Embed[];
        flags: number;
        mentions: {
            channels: string[];
            roles: string[];
            users: JSONUser[];
        };
        timestamp: number;
        type: MessageTypes;
    };
}[]

Type declaration

  • message: {
        attachments: JSONAttachment[];
        content: string;
        editedTimestamp: null | number;
        embeds: Embed[];
        flags: number;
        mentions: {
            channels: string[];
            roles: string[];
            users: JSONUser[];
        };
        timestamp: number;
        type: MessageTypes;
    }
    • attachments: JSONAttachment[]
    • content: string
    • editedTimestamp: null | number
    • embeds: Embed[]
    • flags: number
    • mentions: {
          channels: string[];
          roles: string[];
          users: JSONUser[];
      }
      • channels: string[]
      • roles: string[]
      • users: JSONUser[]
    • timestamp: number
    • type: MessageTypes
nonce?: string | number
pinned: boolean
position?: number
reactions: MessageReaction[]
referencedMessage?: null | JSONMessage
stickerItems?: StickerItem[]
timestamp: number
tts: boolean
webhook?: string