DocComment represents a doc comment coming from a Docs channel.

Hierarchy (view full)

  • Base<number>
    • DocComment

Constructors

  • Parameters

    • data: {
          channelId: string;
          content: string;
          createdAt: string;
          createdBy: string;
          docId: number;
          id: number;
          mentions?: {
              channels?: {
                  id: string;
              }[];
              everyone?: boolean;
              here?: boolean;
              roles?: {
                  id: number;
              }[];
              users?: {
                  id: string;
              }[];
          };
          updatedAt?: string;
      }

      raw data.

      • channelId: string

        Channel ID Format: uuid

        The ID of the channel

      • content: string

        Content Format: long-form markdown

        The content of the doc comment

      • createdAt: string

        Created at Format: date-time

        The ISO 8601 timestamp that the doc comment was created at

      • createdBy: string

        Created by

        The ID of the user who created this doc comment (Note: If this event has createdByWebhookId present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA)

      • docId: number

        Doc ID

        The ID of the doc

      • id: number

        Doc comment ID

        The ID of the doc comment

      • Optionalmentions?: {
            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

      • OptionalupdatedAt?: string

        Updated at Format: date-time

        The ISO 8601 timestamp that the doc comment was updated at, if relevant

    • client: Client

      client.

    • Optionaloptions: ConstructorDocCommentOptions

      Additional properties that can be added.

    Returns DocComment

Properties

channelID: string

ID of the channel the comment is in.

client: Client

App's client.

content: string

The content of the comment.

createdAt: Date

The date of the comment's creation.

docID: number

The ID of the doc the comment is in.

guildID: null | string

ID of the guild, if provided.

id: number

Item ID

memberID: string

ID of the member who created this comment.

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

Mentions.

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

raw: {
    channelId: string;
    content: string;
    createdAt: string;
    createdBy: string;
    docId: number;
    id: number;
    mentions?: {
        channels?: {
            id: string;
        }[];
        everyone?: boolean;
        here?: boolean;
        roles?: {
            id: number;
        }[];
        users?: {
            id: string;
        }[];
    };
    updatedAt?: string;
}

Raw data

Type declaration

  • channelId: string

    Channel ID Format: uuid

    The ID of the channel

  • content: string

    Content Format: long-form markdown

    The content of the doc comment

  • createdAt: string

    Created at Format: date-time

    The ISO 8601 timestamp that the doc comment was created at

  • createdBy: string

    Created by

    The ID of the user who created this doc comment (Note: If this event has createdByWebhookId present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA)

  • docId: number

    Doc ID

    The ID of the doc

  • id: number

    Doc comment ID

    The ID of the doc comment

  • Optionalmentions?: {
        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

  • OptionalupdatedAt?: string

    Updated at Format: date-time

    The ISO 8601 timestamp that the doc comment was updated at, if relevant

updatedAt: null | Date

The date when the comment was last updated.

Accessors

  • get member(): undefined | Member | Promise<Member>
  • Retrieve the member who sent this comment, if cached. If there is no cached member, this will make a rest request which returns a Promise. If the request fails, it'll return undefined or throw an error that you can catch.

    Returns undefined | Member | Promise<Member>

Methods

  • Create a comment in the same doc as this one.

    Parameters

    Returns Promise<DocComment>

  • Add a reaction to this comment.

    Parameters

    • reaction: number

      ID of the reaction to add.

    Returns Promise<void>

  • Delete this comment

    Returns Promise<void>

  • Remove a reaction from this comment.

    Parameters

    • reaction: number

      ID of the reaction to remove.

    Returns Promise<void>