Skip to main content

Class: DocElement

Represents any type of element in the DiscordJS documentation

Hierarchy

Constructors

constructor

new DocElement(doc, docType, data, parent?): DocElement

Parameters

NameType
docDoc
docTypeDocTypes
dataDocIterateeUnion
parent?DocElement

Returns

DocElement

Overrides

DocBase.constructor

Defined in

lib/elements/Element.ts:28

Properties

access

access: string

Defined in

lib/elements/Element.ts:23


children

children: Map<string, DocParam | DocEvent | DocProp | DocMethod>

The children that belong to this element

Inherited from

DocBase.children

Defined in

lib/elements/Base.ts:16


deprecated

deprecated: boolean

Defined in

lib/elements/Element.ts:22


description

description: null | string

Defined in

lib/elements/Element.ts:15


doc

doc: Doc

Defined in

lib/elements/Element.ts:12


docType

docType: null | DocTypes

The type of this element

Inherited from

DocBase.docType

Defined in

lib/elements/Base.ts:19


examples

examples: null | string[]

Defined in

lib/elements/Element.ts:19


extends

extends: null | string[][]

Defined in

lib/elements/Element.ts:25


implements

implements: null | string[][]

Defined in

lib/elements/Element.ts:26


meta

meta: null | DocumentationClassMeta

Defined in

lib/elements/Element.ts:16


name

name: null | string

The name of this element

Inherited from

DocBase.name

Defined in

lib/elements/Base.ts:22


nullable

nullable: boolean

Defined in

lib/elements/Element.ts:21


parent

parent: null | DocElement

Defined in

lib/elements/Element.ts:13


returns

returns: null | string[][][] | DocumentationReturns | DocumentationReturns[]

Defined in

lib/elements/Element.ts:18


scope

scope: null | string

Defined in

lib/elements/Element.ts:24


type

type: null | string[]

Defined in

lib/elements/Element.ts:20

Accessors

classes

get classes(): null | DocClass[]

The stored Classes for this current documentation source

Returns

null | DocClass[]

Inherited from

DocBase.classes

Defined in

lib/elements/Base.ts:82


events

get events(): null | DocEvent[]

The stored Events for this current documentation source

Returns

null | DocEvent[]

Inherited from

DocBase.events

Defined in

lib/elements/Base.ts:129


formattedDescription

get formattedDescription(): string

Returns the pre-formatted description of this element.

Returns

string

Defined in

lib/elements/Element.ts:81


formattedName

get formattedName(): string

Returns the pre-formatted name for this element. This is either the name, or if it is nullish then an empty string.

Returns

string

Defined in

lib/elements/Element.ts:74


functions

get functions(): null | DocFunction[]

The stored Functions for this current documentation source

Returns

null | DocFunction[]

Inherited from

DocBase.functions

Defined in

lib/elements/Base.ts:89


interfaces

get interfaces(): null | DocInterface[]

The stored Interfaces for this current documentation source

Returns

null | DocInterface[]

Inherited from

DocBase.interfaces

Defined in

lib/elements/Base.ts:105


get link(): string

Returns the pre-formatted link of this element. By default this will be returned as a regular markdown masked link. You can further customize this by setting Doc.globalOptions.escapeMarkdownLinks which will wrap the links with <...> so sending the link through a Webhook or Interaction reply will not embed that link in the chat.

Returns

string

Defined in

lib/elements/Element.ts:98


methods

get methods(): null | DocMethod[]

The stored Methods for this current documentation source

Returns

null | DocMethod[]

Inherited from

DocBase.methods

Defined in

lib/elements/Base.ts:121


params

get params(): null | DocParam[]

The stored Params for this current documentation source

Returns

null | DocParam[]

Inherited from

DocBase.params

Defined in

lib/elements/Base.ts:137


props

get props(): null | DocProp[]

The stored Props for this current documentation source

Returns

null | DocProp[]

Inherited from

DocBase.props

Defined in

lib/elements/Base.ts:113


sourceURL

get sourceURL(): null | string

Returns the url to the source code for this element.

Returns

null | string

Defined in

lib/elements/Element.ts:63


static

get static(): boolean

Returns whether this element is static or not.

Returns

boolean

Defined in

lib/elements/Element.ts:109


typedefs

get typedefs(): null | DocTypedef[]

The stored Typedefs for this current documentation source

Returns

null | DocTypedef[]

Inherited from

DocBase.typedefs

Defined in

lib/elements/Base.ts:97


url

get url(): null | string

Returns the URL to this element on the discord.js documentation.

Returns

null | string

Defined in

lib/elements/Element.ts:52

Methods

toJSON

toJSON(): ElementJSON

Overrides what should be returned when calling JSON.stringify on this class

Returns

ElementJSON

Defined in

lib/elements/Element.ts:135