Class DocManager

The manager of docs that belong to a doc channel.

Example

new DocManager(channel);

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

cache: CacheCollection<number, Doc>

This cache of the manager.

channel: DocChannel

The doc channel the docs belong to.

client: Client

The client the manager belongs to.

Methods

  • Create a doc in the channel.

    Returns

    The created doc.

    Example

    docs.create('Title', 'Content');
    

    Parameters

    • title: string

      The title of the doc.

    • content: string

      The content of the doc.

    Returns Promise<Doc>

  • Edit a doc in the channel.

    Returns

    The edited doc.

    Example

    docs.edit(doc, 'Title', 'Content');
    

    Parameters

    • doc: number | Doc

      The doc to edit.

    • title: string

      The title of the doc.

    • content: string

      The content of the doc.

    Returns Promise<Doc>