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

Description

Creates a keybind setting using discord's built in keybind recorder.

Parameters
Name Type Attributes Description
name string

name label of the setting

note string

help/note to show underneath or above the setting

value Array.<string>

array of key names

onChange callable

callback to perform on setting change, callback receives array of keycodes

options object <optional>

object of options to give to the setting

Name Type Attributes Default Description
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