This repository has been archived on 2025-11-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
CommandBot/docs/classes/InputManager.html
T

24 lines
16 KiB
HTML

<!DOCTYPE html><html class="default no-js"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>InputManager | commandbot</title><meta name="description" content="Documentation for commandbot"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">commandbot</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">commandbot</a></li><li><a href="InputManager.html">InputManager</a></li></ul><h1>Class InputManager</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
<p>Object that stores all interaction input data (target, arguments, content and the interaction itself)</p>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">InputManager</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="InputManager.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="InputManager.html#arguments" class="tsd-kind-icon">arguments</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="InputManager.html#command" class="tsd-kind-icon">command</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="InputManager.html#interaction" class="tsd-kind-icon">interaction</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="InputManager.html#target" class="tsd-kind-icon">target</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a href="InputManager.html#get" class="tsd-kind-icon">get</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a name="constructor" class="tsd-anchor"></a><h3>constructor</h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">new <wbr/>Input<wbr/>Manager<span class="tsd-signature-symbol">(</span>command<span class="tsd-signature-symbol">: </span><a href="FunctionCommand.html" class="tsd-signature-type" data-tsd-kind="Class">FunctionCommand</a>, interaction<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Message</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Interaction</span>, args<span class="tsd-signature-symbol">: </span><a href="InputParameter.html" class="tsd-signature-type" data-tsd-kind="Class">InputParameter</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span>, target<span class="tsd-signature-symbol">?: </span><a href="TargetID.html" class="tsd-signature-type" data-tsd-kind="Class">TargetID</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="InputManager.html" class="tsd-signature-type" data-tsd-kind="Class">InputManager</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/71b0f28/src/structures/InputManager.ts#L51">src/structures/InputManager.ts:51</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>command: <a href="FunctionCommand.html" class="tsd-signature-type" data-tsd-kind="Class">FunctionCommand</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>command related to this manager</p>
</div></div></li><li><h5>interaction: <span class="tsd-signature-type">Message</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Interaction</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>interaction or message</p>
</div></div></li><li><h5>args: <a href="InputParameter.html" class="tsd-signature-type" data-tsd-kind="Class">InputParameter</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>list of input arguments</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> target: <a href="TargetID.html" class="tsd-signature-type" data-tsd-kind="Class">TargetID</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="InputManager.html" class="tsd-signature-type" data-tsd-kind="Class">InputManager</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a name="arguments" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagPrivate">Private</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> arguments</h3><div class="tsd-signature tsd-kind-icon">arguments<span class="tsd-signature-symbol">:</span> <a href="InputParameter.html" class="tsd-signature-type" data-tsd-kind="Class">InputParameter</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/71b0f28/src/structures/InputManager.ts#L42">src/structures/InputManager.ts:42</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>All input arguments</p>
</div><dl class="tsd-comment-tags"><dt>readonly</dt><dd></dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a name="command" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> command</h3><div class="tsd-signature tsd-kind-icon">command<span class="tsd-signature-symbol">:</span> <a href="FunctionCommand.html" class="tsd-signature-type" data-tsd-kind="Class">FunctionCommand</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/71b0f28/src/structures/InputManager.ts#L18">src/structures/InputManager.ts:18</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Command related to this manager</p>
</div><dl class="tsd-comment-tags"><dt>readonly</dt><dd></dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a name="interaction" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> interaction</h3><div class="tsd-signature tsd-kind-icon">interaction<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Message</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Interaction</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/71b0f28/src/structures/InputManager.ts#L26">src/structures/InputManager.ts:26</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Command interaction or message</p>
</div><dl class="tsd-comment-tags"><dt>readonly</dt><dd></dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a name="target" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> target</h3><div class="tsd-signature tsd-kind-icon">target<span class="tsd-signature-symbol">?:</span> <a href="TargetID.html" class="tsd-signature-type" data-tsd-kind="Class">TargetID</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/71b0f28/src/structures/InputManager.ts#L34">src/structures/InputManager.ts:34</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Command target (when using context menu interactions)</p>
</div><dl class="tsd-comment-tags"><dt>readonly</dt><dd></dd></dl></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a name="get" class="tsd-anchor"></a><h3>get</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><li class="tsd-signature tsd-kind-icon">get&lt;T&gt;<span class="tsd-signature-symbol">(</span>query<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../modules.html#InputParameterValue" class="tsd-signature-type" data-tsd-kind="Type alias">InputParameterValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/71b0f28/src/structures/InputManager.ts#L65">src/structures/InputManager.ts:65</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get input values</p>
</div></div><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>T<span class="tsd-signature-symbol">: </span><a href="../modules.html#ParameterType" class="tsd-signature-type" data-tsd-kind="Type alias">ParameterType</a></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>query: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>parameter name</p>
</div></div></li><li><h5>type: <span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>parameter type</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../modules.html#InputParameterValue" class="tsd-signature-type" data-tsd-kind="Type alias">InputParameterValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>Argument value bound to a parameter</p>
</div></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class"><a href="InputManager.html" class="tsd-kind-icon">Input<wbr/>Manager</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="InputManager.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="InputManager.html#arguments" class="tsd-kind-icon">arguments</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="InputManager.html#command" class="tsd-kind-icon">command</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="InputManager.html#interaction" class="tsd-kind-icon">interaction</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="InputManager.html#target" class="tsd-kind-icon">target</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a href="InputManager.html#get" class="tsd-kind-icon">get</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>