<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> Class: Discorb::Command::Command — Documentation by YARD 0.9.26 </title> <link rel="stylesheet" href="../../css/style.css" type="text/css" /> <link rel="stylesheet" href="../../css/common.css" type="text/css" /> <script type="text/javascript"> pathId = "Discorb::Command::Command"; relpath = '../../'; </script> <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script> <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script> </head> <body> <div class="nav_wrap"> <iframe id="nav" src="../../class_list.html?1"></iframe> <div id="resizer"></div> </div> <div id="main" tabindex="-1"> <div id="header"> <div id="menu"> <a href="../../a_index.html">Index (C)</a> » <span class='title'><span class='object_link'><a href="../../Discorb.html" title="Discorb (module)">Discorb</a></span></span> » <span class='title'><span class='object_link'><a href="../Command.html" title="Discorb::Command (module)">Command</a></span></span> » <span class="title">Command</span> </div> <div id="search"> <a class="full_list_link" id="class_list_link" href="../../class_list.html"> <svg width="24" height="24"> <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect> <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect> <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect> </svg> </a> </div> <div class="clear"></div> </div> <div id="content"><h1>Class: Discorb::Command::Command <span class="abstract note title">Abstract</span> </h1> <div class="box_info"> <dl> <dt>Inherits:</dt> <dd> <span class="inheritName"><span class='object_link'><a href="../DiscordModel.html" title="Discorb::DiscordModel (class)">DiscordModel</a></span></span> <ul class="fullTree"> <li>Object</li> <li class="next"><span class='object_link'><a href="../DiscordModel.html" title="Discorb::DiscordModel (class)">DiscordModel</a></span></li> <li class="next">Discorb::Command::Command</li> </ul> <a href="#" class="inheritanceTree">show all</a> </dd> </dl> <dl> <dt>Defined in:</dt> <dd>lib/discorb/command.rb</dd> </dl> </div> <h2>Overview</h2><div class="docstring"> <div class="discussion"> <div class="note abstract"> <strong>This class is abstract.</strong> <div class='inline'></div> </div> <p>Represents a application command.</p> </div> </div> <div class="tags"> </div><div id="subclasses"> <h2>Direct Known Subclasses</h2> <p class="children"><span class='object_link'><a href="Command/GroupCommand.html" title="Discorb::Command::Command::GroupCommand (class)">GroupCommand</a></span>, <span class='object_link'><a href="Command/SlashCommand.html" title="Discorb::Command::Command::SlashCommand (class)">SlashCommand</a></span></p> </div> <h2>Defined Under Namespace</h2> <p class="children"> <strong class="classes">Classes:</strong> <span class='object_link'><a href="Command/GroupCommand.html" title="Discorb::Command::Command::GroupCommand (class)">GroupCommand</a></span>, <span class='object_link'><a href="Command/SlashCommand.html" title="Discorb::Command::Command::SlashCommand (class)">SlashCommand</a></span>, <span class='object_link'><a href="Command/SubcommandGroup.html" title="Discorb::Command::Command::SubcommandGroup (class)">SubcommandGroup</a></span> </p> <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2> <ul class="summary"> <li class="public "> <span class="summary_signature"> <a href="#block-instance_method" title="#block (instance method)">#<strong>block</strong> ⇒ Proc </a> </span> <span class="note title readonly">readonly</span> <span class="summary_desc"><div class='inline'><p>The block of the command.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#guild_ids-instance_method" title="#guild_ids (instance method)">#<strong>guild_ids</strong> ⇒ Array<#to_s> </a> </span> <span class="note title readonly">readonly</span> <span class="summary_desc"><div class='inline'><p>The guild ids that the command is enabled in.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#id_map-instance_method" title="#id_map (instance method)">#<strong>id_map</strong> ⇒ Discorb::Dictionary{Discorb::Snowflake, :global => Discorb::Snowflake} </a> </span> <span class="note title readonly">readonly</span> <span class="summary_desc"><div class='inline'><p>The ID mapping.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> ⇒ String </a> </span> <span class="note title readonly">readonly</span> <span class="summary_desc"><div class='inline'><p>The name of the command.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#type-instance_method" title="#type (instance method)">#<strong>type</strong> ⇒ :chat_input, ... </a> </span> <span class="note title readonly">readonly</span> <span class="summary_desc"><div class='inline'><p>The type of the command.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#type_raw-instance_method" title="#type_raw (instance method)">#<strong>type_raw</strong> ⇒ Integer </a> </span> <span class="note title readonly">readonly</span> <span class="summary_desc"><div class='inline'><p>The raw type of the command.</p> </div></span> </li> </ul> <h2>Method Summary</h2> <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../DiscordModel.html" title="Discorb::DiscordModel (class)">DiscordModel</a></span></h3> <p class="inherited"><span class='object_link'><a href="../DiscordModel.html#==-instance_method" title="Discorb::DiscordModel#== (method)">#==</a></span>, <span class='object_link'><a href="../DiscordModel.html#eql%3F-instance_method" title="Discorb::DiscordModel#eql? (method)">#eql?</a></span>, <span class='object_link'><a href="../DiscordModel.html#hash-instance_method" title="Discorb::DiscordModel#hash (method)">#hash</a></span></p> <div id="instance_attr_details" class="attr_details"> <h2>Instance Attribute Details</h2> <span id=""></span> <div class="method_details first"> <h3 class="signature first" id="block-instance_method"> #<strong>block</strong> ⇒ <tt>Proc</tt> <span class="extras">(readonly)</span> </h3><div class="docstring"> <div class="discussion"> <p>Returns The block of the command.</p> </div> </div> <div class="tags"> <p class="tag_title">Returns:</p> <ul class="return"> <li> <span class='type'>(<tt>Proc</tt>)</span> — <div class='inline'><p>The block of the command.</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 128 129 130</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/discorb/command.rb', line 128</span> <span class='kw'>def</span> <span class='id identifier rubyid_block'>block</span> <span class='ivar'>@block</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <span id=""></span> <div class="method_details "> <h3 class="signature " id="guild_ids-instance_method"> #<strong>guild_ids</strong> ⇒ <tt>Array<#to_s></tt> <span class="extras">(readonly)</span> </h3><div class="docstring"> <div class="discussion"> <p>Returns The guild ids that the command is enabled in.</p> </div> </div> <div class="tags"> <p class="tag_title">Returns:</p> <ul class="return"> <li> <span class='type'>(<tt>Array<#to_s></tt>)</span> — <div class='inline'><p>The guild ids that the command is enabled in.</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 126 127 128</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/discorb/command.rb', line 126</span> <span class='kw'>def</span> <span class='id identifier rubyid_guild_ids'>guild_ids</span> <span class='ivar'>@guild_ids</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <span id=""></span> <div class="method_details "> <h3 class="signature " id="id_map-instance_method"> #<strong>id_map</strong> ⇒ <tt><span class='object_link'><a href="../Dictionary.html" title="Discorb::Dictionary (class)">Discorb::Dictionary</a></span>{<span class='object_link'><a href="../Snowflake.html" title="Discorb::Snowflake (class)">Discorb::Snowflake</a></span>, :global => <span class='object_link'><a href="../Snowflake.html" title="Discorb::Snowflake (class)">Discorb::Snowflake</a></span>}</tt> <span class="extras">(readonly)</span> </h3><div class="docstring"> <div class="discussion"> <p>Returns The ID mapping.</p> </div> </div> <div class="tags"> <p class="tag_title">Returns:</p> <ul class="return"> <li> <span class='type'>(<tt><span class='object_link'><a href="../Dictionary.html" title="Discorb::Dictionary (class)">Discorb::Dictionary</a></span>{<span class='object_link'><a href="../Snowflake.html" title="Discorb::Snowflake (class)">Discorb::Snowflake</a></span>, :global => <span class='object_link'><a href="../Snowflake.html" title="Discorb::Snowflake (class)">Discorb::Snowflake</a></span>}</tt>)</span> — <div class='inline'><p>The ID mapping.</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 134 135 136</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/discorb/command.rb', line 134</span> <span class='kw'>def</span> <span class='id identifier rubyid_id_map'>id_map</span> <span class='ivar'>@id_map</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <span id=""></span> <div class="method_details "> <h3 class="signature " id="name-instance_method"> #<strong>name</strong> ⇒ <tt>String</tt> <span class="extras">(readonly)</span> </h3><div class="docstring"> <div class="discussion"> <p>Returns The name of the command.</p> </div> </div> <div class="tags"> <p class="tag_title">Returns:</p> <ul class="return"> <li> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'><p>The name of the command.</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 124 125 126</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/discorb/command.rb', line 124</span> <span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span> <span class='ivar'>@name</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <span id=""></span> <div class="method_details "> <h3 class="signature " id="type-instance_method"> #<strong>type</strong> ⇒ <tt>:chat_input</tt>, ... <span class="extras">(readonly)</span> </h3><div class="docstring"> <div class="discussion"> <p>Returns The type of the command.</p> </div> </div> <div class="tags"> <p class="tag_title">Returns:</p> <ul class="return"> <li> <span class='type'>(<tt>:chat_input</tt>, <tt>:user</tt>, <tt>:message</tt>)</span> — <div class='inline'><p>The type of the command.</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 130 131 132</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/discorb/command.rb', line 130</span> <span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span> <span class='ivar'>@type</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <span id=""></span> <div class="method_details "> <h3 class="signature " id="type_raw-instance_method"> #<strong>type_raw</strong> ⇒ <tt>Integer</tt> <span class="extras">(readonly)</span> </h3><div class="docstring"> <div class="discussion"> <p>Returns The raw type of the command.</p> </div> </div> <div class="tags"> <p class="tag_title">Returns:</p> <ul class="return"> <li> <span class='type'>(<tt>Integer</tt>)</span> — <div class='inline'><p>The raw type of the command.</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 132 133 134</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/discorb/command.rb', line 132</span> <span class='kw'>def</span> <span class='id identifier rubyid_type_raw'>type_raw</span> <span class='ivar'>@type_raw</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> </div> </div> <div id="footer"> Generated from <a href="https://github.com/discorb-lib/discorb/tree/92458538de1b949348a05adf9b6a71df0e532cc8"><code>92458538de1b949348a05adf9b6a71df0e532cc8</code></a>, version v0.2.2, with YARD 0.9.26. </div> </div> </body> </html>