new Textbox( name, note, value, onChange [, options ] )

Description

Creates a textbox using discord's built in textbox.

Parameters
Name Type Attributes Description
name string

name label of the setting

note string

help/note to show underneath or above the setting

value string

current text in box

onChange callable

callback to perform on setting change, callback receives text

options object <optional>

object of options to give to the setting

Name Type Attributes Default Description
placeholder string <optional>
""

placeholder for when textbox is empty

disabled boolean <optional>
false

should the setting be disabled

Methods


getElement() → {HTMLElement}

Returns
  • root element for setting

onChange()

Description

Fires onchange to listeners


onAdded()

Description

Fired when root node added to DOM


onRemoved()

Description

Fired when root node removed from DOM