<codeclass="descclassname">royalnet.utils.</code><codeclass="descname">asyncify</code><spanclass="sig-paren">(</span><em>function: Callable</em>, <em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#royalnet.utils.asyncify"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="class">
<dtid="royalnet.utils.Call">
<emclass="property">class </em><codeclass="descclassname">royalnet.utils.</code><codeclass="descname">Call</code><spanclass="sig-paren">(</span><em>channel, command: Type[royalnet.utils.command.Command], command_args: List[str] = None, **kwargs</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#royalnet.utils.Call"title="Permalink to this definition">¶</a></dt>
<dd><p>A command call. Still an abstract class, subbots should create a new call from this.</p>
<dlclass="attribute">
<dtid="royalnet.utils.Call.alchemy">
<codeclass="descname">alchemy</code><emclass="property"> = NotImplemented</em><aclass="headerlink"href="#royalnet.utils.Call.alchemy"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="royalnet.utils.Call.get_author">
<codeclass="descname">get_author</code><spanclass="sig-paren">(</span><em>error_if_none=False</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#royalnet.utils.Call.get_author"title="Permalink to this definition">¶</a></dt>
<dd><p>Try to find the universal identifier of the user that sent the message.
That probably means, the database row identifying the user.
Raise a UnregisteredError if error_if_none is set to True and no author is found.</p>
</dd></dl>
<dlclass="attribute">
<dtid="royalnet.utils.Call.interface_name">
<codeclass="descname">interface_name</code><emclass="property"> = NotImplemented</em><aclass="headerlink"href="#royalnet.utils.Call.interface_name"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="attribute">
<dtid="royalnet.utils.Call.interface_obj">
<codeclass="descname">interface_obj</code><emclass="property"> = NotImplemented</em><aclass="headerlink"href="#royalnet.utils.Call.interface_obj"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="attribute">
<dtid="royalnet.utils.Call.interface_prefix">
<codeclass="descname">interface_prefix</code><emclass="property"> = NotImplemented</em><aclass="headerlink"href="#royalnet.utils.Call.interface_prefix"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="royalnet.utils.Call.net_request">
<codeclass="descname">net_request</code><spanclass="sig-paren">(</span><em>message: royalnet.network.messages.Message</em>, <em>destination: str</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#royalnet.utils.Call.net_request"title="Permalink to this definition">¶</a></dt>
<dd><p>Send data to the rest of the Royalnet, and optionally wait for an answer.
The data must be pickleable.</p>
</dd></dl>
<dlclass="method">
<dtid="royalnet.utils.Call.reply">
<codeclass="descname">reply</code><spanclass="sig-paren">(</span><em>text: str</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#royalnet.utils.Call.reply"title="Permalink to this definition">¶</a></dt>
<dd><p>Send a text message to the channel the call was made.</p>
</dd></dl>
<dlclass="method">
<dtid="royalnet.utils.Call.run">
<codeclass="descname">run</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#royalnet.utils.Call.run"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="royalnet.utils.Call.session_end">
<codeclass="descname">session_end</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#royalnet.utils.Call.session_end"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="royalnet.utils.Call.session_init">
<codeclass="descname">session_init</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#royalnet.utils.Call.session_init"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="royalnet.utils.Command">
<emclass="property">class </em><codeclass="descclassname">royalnet.utils.</code><codeclass="descname">Command</code><aclass="headerlink"href="#royalnet.utils.Command"title="Permalink to this definition">¶</a></dt>
<dd><p>A generic command, called from any source.</p>
<codeclass="descname">command_description</code><emclass="property"> = NotImplemented</em><aclass="headerlink"href="#royalnet.utils.Command.command_description"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="attribute">
<dtid="royalnet.utils.Command.command_name">
<codeclass="descname">command_name</code><emclass="property"> = NotImplemented</em><aclass="headerlink"href="#royalnet.utils.Command.command_name"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="attribute">
<dtid="royalnet.utils.Command.command_syntax">
<codeclass="descname">command_syntax</code><emclass="property"> = NotImplemented</em><aclass="headerlink"href="#royalnet.utils.Command.command_syntax"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="classmethod">
<dtid="royalnet.utils.Command.common">
<emclass="property">classmethod </em><codeclass="descname">common</code><spanclass="sig-paren">(</span><em>call: Call</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#royalnet.utils.Command.common"title="Permalink to this definition">¶</a></dt>
<emclass="property">classmethod </em><codeclass="descname">network_handler_dict</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#royalnet.utils.Command.network_handler_dict"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="attribute">
<dtid="royalnet.utils.Command.network_handlers">
<codeclass="descname">network_handlers</code><emclass="property"> = {}</em><aclass="headerlink"href="#royalnet.utils.Command.network_handlers"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">require_alchemy_tables</code><emclass="property"> = {}</em><aclass="headerlink"href="#royalnet.utils.Command.require_alchemy_tables"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="function">
<dtid="royalnet.utils.safeformat">
<codeclass="descclassname">royalnet.utils.</code><codeclass="descname">safeformat</code><spanclass="sig-paren">(</span><em>string: str</em>, <em>ignore_escaping: bool = False</em>, <em>**words</em><spanclass="sig-paren">)</span>→ str<aclass="headerlink"href="#royalnet.utils.safeformat"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="royalnet.utils.cdj">
<codeclass="descclassname">royalnet.utils.</code><codeclass="descname">cdj</code><spanclass="sig-paren">(</span><em>class_</em><spanclass="sig-paren">)</span>→ dict<aclass="headerlink"href="#royalnet.utils.cdj"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the cleaned class attributes in a dict.</p>
<codeclass="descclassname">royalnet.utils.</code><codeclass="descname">sleep_until</code><spanclass="sig-paren">(</span><em>dt: datetime.datetime</em><spanclass="sig-paren">)</span>→ None<aclass="headerlink"href="#royalnet.utils.sleep_until"title="Permalink to this definition">¶</a></dt>
<dd><p>Block the call until the specified datetime.</p>
<codeclass="descclassname">royalnet.utils.</code><codeclass="descname">plusformat</code><spanclass="sig-paren">(</span><em>i: int</em><spanclass="sig-paren">)</span>→ str<aclass="headerlink"href="#royalnet.utils.plusformat"title="Permalink to this definition">¶</a></dt>
<dd><p>Convert an <aclass="reference external"href="https://docs.python.org/3.7/library/functions.html#int"title="(in Python v3.7)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">int</span></code></a> to a string, adding a plus if they are greater than 0.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>i</strong>– the <aclass="reference external"href="https://docs.python.org/3.7/library/functions.html#int"title="(in Python v3.7)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">int</span></code></a> to convert</p>
<emclass="property">class </em><codeclass="descclassname">royalnet.utils.</code><codeclass="descname">CommandArgs</code><aclass="headerlink"href="#royalnet.utils.CommandArgs"title="Permalink to this definition">¶</a></dt>
<dd><p>The arguments of a command. Raises <codeclass="xref py py-exc docutils literal notranslate"><spanclass="pre">InvalidInputError</span></code> if the requested argument does not exist.</p>
<codeclass="descname">joined</code><spanclass="sig-paren">(</span><em>*</em>, <em>require_at_least=0</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#royalnet.utils.CommandArgs.joined"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="royalnet.utils.CommandArgs.match">
<codeclass="descname">match</code><spanclass="sig-paren">(</span><em>pattern: Pattern[AnyStr]</em><spanclass="sig-paren">)</span>→ Sequence[AnyStr]<aclass="headerlink"href="#royalnet.utils.CommandArgs.match"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="royalnet.utils.CommandArgs.optional">
<codeclass="descname">optional</code><spanclass="sig-paren">(</span><em>index: int</em>, <em>default=None</em><spanclass="sig-paren">)</span>→ Optional<aclass="headerlink"href="#royalnet.utils.CommandArgs.optional"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="royalnet.utils.NetworkHandler">
<emclass="property">class </em><codeclass="descclassname">royalnet.utils.</code><codeclass="descname">NetworkHandler</code><aclass="headerlink"href="#royalnet.utils.NetworkHandler"title="Permalink to this definition">¶</a></dt>
<dd><p>The NetworkHandler functions are called when a specific Message type is received.</p>
<codeclass="descname">message_type</code><emclass="property"> = NotImplemented</em><aclass="headerlink"href="#royalnet.utils.NetworkHandler.message_type"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="function">
<dtid="royalnet.utils.safefilename">
<codeclass="descclassname">royalnet.utils.</code><codeclass="descname">safefilename</code><spanclass="sig-paren">(</span><em>string: str</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#royalnet.utils.safefilename"title="Permalink to this definition">¶</a></dt>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.