Skip to main content

Class: DocFunction

Represents a Function in the DiscordJS documentation

Hierarchy

Constructors

constructor

new DocFunction(doc, data): DocFunction

Parameters

NameType
docDoc
dataDocumentationClassMethod

Returns

DocFunction

Overrides

DocElement.constructor

Defined in

lib/elements/Function.ts:11

Properties

access

access: string

Inherited from

DocElement.access

Defined in

lib/elements/Element.ts:23


children

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

The children that belong to this element

Inherited from

DocElement.children

Defined in

lib/elements/Base.ts:16


deprecated

deprecated: boolean

Inherited from

DocElement.deprecated

Defined in

lib/elements/Element.ts:22


description

description: null | string

Inherited from

DocElement.description

Defined in

lib/elements/Element.ts:15


doc

doc: Doc

Inherited from

DocElement.doc

Defined in

lib/elements/Element.ts:12


docType

docType: null | DocTypes

The type of this element

Inherited from

DocElement.docType

Defined in

lib/elements/Base.ts:19


examples

examples: null | string[]

Inherited from

DocElement.examples

Defined in

lib/elements/Element.ts:19


extends

extends: null | string[][]

Inherited from

DocElement.extends

Defined in

lib/elements/Element.ts:25


implements

implements: null | string[][]

Inherited from

DocElement.implements

Defined in

lib/elements/Element.ts:26


meta

meta: null | DocumentationClassMeta

Inherited from

DocElement.meta

Defined in

lib/elements/Element.ts:16


name

name: null | string

The name of this element

Inherited from

DocElement.name

Defined in

lib/elements/Base.ts:22


nullable

nullable: boolean

Inherited from

DocElement.nullable

Defined in

lib/elements/Element.ts:21


parent

parent: null | DocElement

Inherited from

DocElement.parent

Defined in

lib/elements/Element.ts:13


returns

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

Inherited from

DocElement.returns

Defined in

lib/elements/Element.ts:18


scope

scope: null | string

Inherited from

DocElement.scope

Defined in

lib/elements/Element.ts:24


type

type: null | string[]

Inherited from

DocElement.type

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

DocElement.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

DocElement.events

Defined in

lib/elements/Base.ts:129


formattedDescription

get formattedDescription(): string

Returns the pre-formatted description of this element.

Returns

string

Inherited from

DocElement.formattedDescription

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

Inherited from

DocElement.formattedName

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

DocElement.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

DocElement.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

Inherited from

DocElement.link

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

DocElement.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

DocElement.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

DocElement.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

Inherited from

DocElement.sourceURL

Defined in

lib/elements/Element.ts:63


static

get static(): boolean

Returns whether this element is static or not.

Returns

boolean

Inherited from

DocElement.static

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

DocElement.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

Inherited from

DocElement.url

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

Inherited from

DocElement.toJSON

Defined in

lib/elements/Element.ts:135