Doc represents an item of a "Docs" channel.

Hierarchy (view full)

Constructors

  • Parameters

    • data: {
          channelId: string;
          content: string;
          createdAt: string;
          createdBy: string;
          groupId: string;
          id: number;
          mentions?: {
              channels?: {
                  id: string;
              }[];
              everyone?: boolean;
              here?: boolean;
              roles?: {
                  id: number;
              }[];
              users?: {
                  id: string;
              }[];
          };
          serverId: string;
          title: string;
          updatedAt?: string;
          updatedBy?: 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

      • createdAt: string

        Created at Format: date-time

        The ISO 8601 timestamp that the doc was created at

      • createdBy: string

        Created by

        The ID of the user who created this doc

      • groupId: string

        Group ID

        The ID of the group

      • id: number

        Doc ID

        The ID of the doc

      • 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

      • serverId: string

        Server ID

        The ID of the server

      • title: string

        Title

        The title of the doc

      • OptionalupdatedAt?: string

        Updated at Format: date-time

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

      • OptionalupdatedBy?: string

        Updated by

        The ID of the user who updated this doc

    • client: Client

      client

    Returns Doc

Properties

channelID: string

ID of the 'docs' channel.

client: Client

App's client.

comments: TypedCollection<number, {
    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;
}, DocComment, []>

Cached comments.

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

content: string

Content of the doc

createdAt: Date

When the doc has been created.

editedTimestamp: null | Date

When the doc has been updated.

guildID: string

Guild/server id

id: number

Item ID

memberID: string

ID of the member who created this doc.

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

Doc 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

name: string

Doc name

updatedBy: null | string

ID of the member who updated the doc.

Accessors

  • get member(): Member | Promise<Member>
  • Retrieve the member who executed this action. Note: If this doc has been edited, the updatedBy id will be used to get you the member.

    Returns Member | Promise<Member>

Methods

  • Delete this doc.

    Returns Promise<void>

  • Edit this doc.

    Parameters

    Returns Promise<Doc>