Archived
55 lines
33 KiB
HTML
55 lines
33 KiB
HTML
<!DOCTYPE html><html class="default no-js"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>ContextMenuCommand | 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="ContextMenuCommand.html">ContextMenuCommand</a></li></ul><h1>Class ContextMenuCommand</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>Representation of all context menu Discord interactions</p>
|
|
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="PermissionGuildCommand.html" class="tsd-signature-type" data-tsd-kind="Class">PermissionGuildCommand</a><ul class="tsd-hierarchy"><li><span class="target">ContextMenuCommand</span></li></ul></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 tsd-is-overwrite"><a href="ContextMenuCommand.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-inherited"><a href="ContextMenuCommand.html#announceSuccess" class="tsd-kind-icon">announce<wbr/>Success</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="ContextMenuCommand.html#contextType" class="tsd-kind-icon">context<wbr/>Type</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#default_permission" class="tsd-kind-icon">default_<wbr/>permission</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#dm" class="tsd-kind-icon">dm</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#ephemeral" class="tsd-kind-icon">ephemeral</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#guilds" class="tsd-kind-icon">guilds</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#manager" class="tsd-kind-icon">manager</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#name" class="tsd-kind-icon">name</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#permissions" class="tsd-kind-icon">permissions</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#type" class="tsd-kind-icon">type</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 tsd-is-inherited"><a href="ContextMenuCommand.html#isBaseCommandType" class="tsd-kind-icon">is<wbr/>Base<wbr/>Command<wbr/>Type</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ContextMenuCommand.html#isChildCommandType" class="tsd-kind-icon">is<wbr/>Child<wbr/>Command<wbr/>Type</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ContextMenuCommand.html#isCommandType" class="tsd-kind-icon">is<wbr/>Command<wbr/>Type</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#start" class="tsd-kind-icon">start</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuCommand.html#toObject" class="tsd-kind-icon">to<wbr/>Object</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 tsd-is-overwrite"><a name="constructor" class="tsd-anchor"></a><h3>constructor</h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">new <wbr/>Context<wbr/>Menu<wbr/>Command<span class="tsd-signature-symbol">(</span>manager<span class="tsd-signature-symbol">: </span><a href="CommandManager.html" class="tsd-signature-type" data-tsd-kind="Class">CommandManager</a>, options<span class="tsd-signature-symbol">: </span><a href="../interfaces/ContextMenuCommandInit.html" class="tsd-signature-type" data-tsd-kind="Interface">ContextMenuCommandInit</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ContextMenuCommand.html" class="tsd-signature-type" data-tsd-kind="Class">ContextMenuCommand</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides <a href="PermissionGuildCommand.html">PermissionGuildCommand</a>.<a href="PermissionGuildCommand.html#constructor">constructor</a></p><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/8d10fb3/src/commands/ContextMenuCommand.ts#L26">src/commands/ContextMenuCommand.ts:26</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Context menu command constructor</p>
|
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>manager: <a href="CommandManager.html" class="tsd-signature-type" data-tsd-kind="Class">CommandManager</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>manager that this command belongs to</p>
|
|
</div></div></li><li><h5>options: <a href="../interfaces/ContextMenuCommandInit.html" class="tsd-signature-type" data-tsd-kind="Interface">ContextMenuCommandInit</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>initialization options</p>
|
|
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="ContextMenuCommand.html" class="tsd-signature-type" data-tsd-kind="Class">ContextMenuCommand</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-inherited"><a name="announceSuccess" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> announce<wbr/>Success</h3><div class="tsd-signature tsd-kind-icon">announce<wbr/>Success<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><p>Inherited from <a href="PermissionGuildCommand.html">PermissionGuildCommand</a>.<a href="PermissionGuildCommand.html#announceSuccess">announceSuccess</a></p><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/8d10fb3/src/commands/base/FunctionCommand.ts#L28">src/commands/base/FunctionCommand.ts:28</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Whether a SUCCESS message should be sent after executing the command function (when there is no other reply)</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="contextType" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> context<wbr/>Type</h3><div class="tsd-signature tsd-kind-icon">context<wbr/>Type<span class="tsd-signature-symbol">:</span> <a href="../modules.html#ContextType" class="tsd-signature-type" data-tsd-kind="Type alias">ContextType</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/8d10fb3/src/commands/ContextMenuCommand.ts#L18">src/commands/ContextMenuCommand.ts:18</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Type of context menu interaction</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 tsd-is-inherited"><a name="default_permission" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> default_<wbr/>permission</h3><div class="tsd-signature tsd-kind-icon">default_<wbr/>permission<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><p>Inherited from <a href="PermissionGuildCommand.html">PermissionGuildCommand</a>.<a href="PermissionGuildCommand.html#default_permission">default_permission</a></p><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/8d10fb3/src/commands/base/Command.ts#L47">src/commands/base/Command.ts:47</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Discord API default_permission</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 tsd-is-inherited"><a name="dm" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> dm</h3><div class="tsd-signature tsd-kind-icon">dm<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><p>Inherited from <a href="PermissionGuildCommand.html">PermissionGuildCommand</a>.<a href="PermissionGuildCommand.html#dm">dm</a></p><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/8d10fb3/src/commands/base/PermissionGuildCommand.ts#L29">src/commands/base/PermissionGuildCommand.ts:29</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>If set to <em>false</em>, all interactions that get invoked from private/direct conversations (outside a guild) will result a PermissionError</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 tsd-is-inherited"><a name="ephemeral" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> ephemeral</h3><div class="tsd-signature tsd-kind-icon">ephemeral<span class="tsd-signature-symbol">:</span> <a href="../modules.html#EphemeralType" class="tsd-signature-type" data-tsd-kind="Type alias">EphemeralType</a></div><aside class="tsd-sources"><p>Inherited from <a href="PermissionGuildCommand.html">PermissionGuildCommand</a>.<a href="PermissionGuildCommand.html#ephemeral">ephemeral</a></p><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/8d10fb3/src/commands/base/FunctionCommand.ts#L41">src/commands/base/FunctionCommand.ts:41</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Whether a reply should be visible only to the caller</p>
|
|
</div><div><ul>
|
|
<li>NONE - bot replies are public and visible to everyone in a text channel</li>
|
|
<li>INTERACTIONS - bot will mark responses to Discord interactions as ephemeral and they will only be visible to the command caller</li>
|
|
<li>FULL - INTERACTIONS + responses to prefix interactions will be sent as direct messages to the command caller</li>
|
|
</ul>
|
|
<p><a href="https://support.discord.com/hc/pl/articles/1500000580222-Ephemeral-Messages-FAQ">Read more</a></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 tsd-is-inherited"><a name="guilds" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> guilds</h3><div class="tsd-signature tsd-kind-icon">guilds<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><p>Inherited from <a href="PermissionGuildCommand.html">PermissionGuildCommand</a>.<a href="PermissionGuildCommand.html#guilds">guilds</a></p><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/8d10fb3/src/commands/base/PermissionGuildCommand.ts#L21">src/commands/base/PermissionGuildCommand.ts:21</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>List of Discord guild (server) IDs in which this command can be used</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 tsd-is-inherited"><a name="manager" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> manager</h3><div class="tsd-signature tsd-kind-icon">manager<span class="tsd-signature-symbol">:</span> <a href="CommandManager.html" class="tsd-signature-type" data-tsd-kind="Class">CommandManager</a></div><aside class="tsd-sources"><p>Inherited from <a href="PermissionGuildCommand.html">PermissionGuildCommand</a>.<a href="PermissionGuildCommand.html#manager">manager</a></p><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/8d10fb3/src/commands/base/Command.ts#L23">src/commands/base/Command.ts:23</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Manager in which this command is registered</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 tsd-is-inherited"><a name="name" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> name</h3><div class="tsd-signature tsd-kind-icon">name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from <a href="PermissionGuildCommand.html">PermissionGuildCommand</a>.<a href="PermissionGuildCommand.html#name">name</a></p><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/8d10fb3/src/commands/base/Command.ts#L31">src/commands/base/Command.ts:31</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Command name</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 tsd-is-inherited"><a name="permissions" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> permissions</h3><div class="tsd-signature tsd-kind-icon">permissions<span class="tsd-signature-symbol">:</span> <a href="CommandPermissions.html" class="tsd-signature-type" data-tsd-kind="Class">CommandPermissions</a></div><aside class="tsd-sources"><p>Inherited from <a href="PermissionGuildCommand.html">PermissionGuildCommand</a>.<a href="PermissionGuildCommand.html#permissions">permissions</a></p><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/8d10fb3/src/commands/base/PermissionCommand.ts#L21">src/commands/base/PermissionCommand.ts:21</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Object containing check functions and permission bitfields</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 tsd-is-inherited"><a name="type" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> type</h3><div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <a href="../modules.html#CommandType" class="tsd-signature-type" data-tsd-kind="Type alias">CommandType</a></div><aside class="tsd-sources"><p>Inherited from <a href="PermissionGuildCommand.html">PermissionGuildCommand</a>.<a href="PermissionGuildCommand.html#type">type</a></p><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/8d10fb3/src/commands/base/Command.ts#L39">src/commands/base/Command.ts:39</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>CommandBot's internal command type</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 tsd-is-inherited"><a name="isBaseCommandType" class="tsd-anchor"></a><h3>is<wbr/>Base<wbr/>Command<wbr/>Type</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">is<wbr/>Base<wbr/>Command<wbr/>Type<T><span class="tsd-signature-symbol">(</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">this</span><span class="tsd-signature-symbol"> is </span><a href="../modules.html#BaseCommands" class="tsd-signature-type" data-tsd-kind="Type alias">BaseCommands</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="PermissionGuildCommand.html">PermissionGuildCommand</a>.<a href="PermissionGuildCommand.html#isBaseCommandType">isBaseCommandType</a></p><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/8d10fb3/src/commands/base/Command.ts#L88">src/commands/base/Command.ts:88</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Check base command type</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#BaseCommandType" class="tsd-signature-type" data-tsd-kind="Type alias">BaseCommandType</a></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><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>base command type</p>
|
|
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span><span class="tsd-signature-symbol"> is </span><a href="../modules.html#BaseCommands" class="tsd-signature-type" data-tsd-kind="Type alias">BaseCommands</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span></h4><div><p>Whether this command can be used as the given type</p>
|
|
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a name="isChildCommandType" class="tsd-anchor"></a><h3>is<wbr/>Child<wbr/>Command<wbr/>Type</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">is<wbr/>Child<wbr/>Command<wbr/>Type<T><span class="tsd-signature-symbol">(</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">this</span><span class="tsd-signature-symbol"> is </span><a href="../modules.html#ChildCommands" class="tsd-signature-type" data-tsd-kind="Type alias">ChildCommands</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="PermissionGuildCommand.html">PermissionGuildCommand</a>.<a href="PermissionGuildCommand.html#isChildCommandType">isChildCommandType</a></p><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/8d10fb3/src/commands/base/Command.ts#L155">src/commands/base/Command.ts:155</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Check child command type</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#ChildCommandType" class="tsd-signature-type" data-tsd-kind="Type alias">ChildCommandType</a></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><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>child command type</p>
|
|
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span><span class="tsd-signature-symbol"> is </span><a href="../modules.html#ChildCommands" class="tsd-signature-type" data-tsd-kind="Type alias">ChildCommands</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span></h4><div><p>Whether this command can be used as a child command of the given type</p>
|
|
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a name="isCommandType" class="tsd-anchor"></a><h3>is<wbr/>Command<wbr/>Type</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">is<wbr/>Command<wbr/>Type<T><span class="tsd-signature-symbol">(</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">this</span><span class="tsd-signature-symbol"> is </span><a href="../modules.html#Commands" class="tsd-signature-type" data-tsd-kind="Type alias">Commands</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="PermissionGuildCommand.html">PermissionGuildCommand</a>.<a href="PermissionGuildCommand.html#isCommandType">isCommandType</a></p><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/8d10fb3/src/commands/base/Command.ts#L128">src/commands/base/Command.ts:128</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Checks command type</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#CommandType" class="tsd-signature-type" data-tsd-kind="Type alias">CommandType</a></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><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>command type</p>
|
|
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span><span class="tsd-signature-symbol"> is </span><a href="../modules.html#Commands" class="tsd-signature-type" data-tsd-kind="Type alias">Commands</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span></h4><div><p>Whether this command can be used as the given type</p>
|
|
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a name="start" class="tsd-anchor"></a><h3>start</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">start<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><a href="InputManager.html" class="tsd-signature-type" data-tsd-kind="Class">InputManager</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="PermissionGuildCommand.html">PermissionGuildCommand</a>.<a href="PermissionGuildCommand.html#start">start</a></p><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/8d10fb3/src/commands/base/PermissionGuildCommand.ts#L59">src/commands/base/PermissionGuildCommand.ts:59</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Invoke the command</p>
|
|
</div><dl class="tsd-comment-tags"><dt>async</dt><dd></dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>input: <a href="InputManager.html" class="tsd-signature-type" data-tsd-kind="Class">InputManager</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>input data</p>
|
|
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a name="toObject" class="tsd-anchor"></a><h3>to<wbr/>Object</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">to<wbr/>Object<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/ContextMenuCommandObject.html" class="tsd-signature-type" data-tsd-kind="Interface">ContextMenuCommandObject</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides <a href="PermissionGuildCommand.html">PermissionGuildCommand</a>.<a href="PermissionGuildCommand.html#toObject">toObject</a></p><ul><li>Defined in <a href="https://github.com/GRZ4NA/DiscordCommands/blob/8d10fb3/src/commands/ContextMenuCommand.ts#L44">src/commands/ContextMenuCommand.ts:44</a></li></ul></aside><h4 class="tsd-returns-title">Returns <a href="../interfaces/ContextMenuCommandObject.html" class="tsd-signature-type" data-tsd-kind="Interface">ContextMenuCommandObject</a></h4><div><p>Discord API object</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="ContextMenuCommand.html" class="tsd-kind-icon">Context<wbr/>Menu<wbr/>Command</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuCommand.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#announceSuccess" class="tsd-kind-icon">announce<wbr/>Success</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="ContextMenuCommand.html#contextType" class="tsd-kind-icon">context<wbr/>Type</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#default_permission" class="tsd-kind-icon">default_<wbr/>permission</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#dm" class="tsd-kind-icon">dm</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#ephemeral" class="tsd-kind-icon">ephemeral</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#guilds" class="tsd-kind-icon">guilds</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#manager" class="tsd-kind-icon">manager</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#name" class="tsd-kind-icon">name</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#permissions" class="tsd-kind-icon">permissions</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#type" class="tsd-kind-icon">type</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ContextMenuCommand.html#isBaseCommandType" class="tsd-kind-icon">is<wbr/>Base<wbr/>Command<wbr/>Type</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ContextMenuCommand.html#isChildCommandType" class="tsd-kind-icon">is<wbr/>Child<wbr/>Command<wbr/>Type</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ContextMenuCommand.html#isCommandType" class="tsd-kind-icon">is<wbr/>Command<wbr/>Type</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ContextMenuCommand.html#start" class="tsd-kind-icon">start</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuCommand.html#toObject" class="tsd-kind-icon">to<wbr/>Object</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> |