Skip to content

Commit

Permalink
Deploying to gh-pages from @ 360cdc5 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
jb3 committed Sep 11, 2024
1 parent 3cc7f1c commit b1a8770
Show file tree
Hide file tree
Showing 44 changed files with 739 additions and 734 deletions.
2 changes: 1 addition & 1 deletion .build
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
dist/lato-latin-ext-400-normal-N27NCBWW.woff2
dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2
dist/remixicon-NKANDIL5.woff2
dist/search_data-0DF2DC95.js
dist/search_data-6EB43D3D.js
dist/sidebar_items-E9C8C345.js
event_handling.html
gateway_compression.html
Expand Down
4 changes: 2 additions & 2 deletions Nostrum.Api.Ratelimiter.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ <h1>
<p>The ratelimiter is fully asynchronous internally. In theory, it also supports
queueing requests in an asynchronous manner. However, support for this is
currently not implemented in <a href="Nostrum.Api.html"><code class="inline">Nostrum.Api</code></a>.</p><p>If you want to make one or multiple asynchronous requests manually, you can
use the following pattern:</p><pre><code class="makeup elixir" translate="no"><span class="n">req</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">:gen_statem</span><span class="o">.</span><span class="n">send_request</span><span class="p" data-group-id="4971748866-1">(</span><span class="nc">Nostrum.Api.Ratelimiter</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4971748866-2">{</span><span class="ss">:queue</span><span class="p">,</span><span class="w"> </span><span class="n">request</span><span class="p" data-group-id="4971748866-2">}</span><span class="p" data-group-id="4971748866-1">)</span><span class="w">
use the following pattern:</p><pre><code class="makeup elixir" translate="no"><span class="n">req</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">:gen_statem</span><span class="o">.</span><span class="n">send_request</span><span class="p" data-group-id="0967025338-1">(</span><span class="nc">Nostrum.Api.Ratelimiter</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0967025338-2">{</span><span class="ss">:queue</span><span class="p">,</span><span class="w"> </span><span class="n">request</span><span class="p" data-group-id="0967025338-2">}</span><span class="p" data-group-id="0967025338-1">)</span><span class="w">
</span><span class="c1"># ...</span><span class="w">
</span><span class="n">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">:gen_statem</span><span class="o">.</span><span class="n">receive_response</span><span class="p" data-group-id="4971748866-3">(</span><span class="n">req</span><span class="p">,</span><span class="w"> </span><span class="n">timeout</span><span class="p" data-group-id="4971748866-3">)</span></code></pre><p>where <code class="inline">request</code> is a map describing the request to run - see <a href="Nostrum.Api.html"><code class="inline">Nostrum.Api</code></a>
</span><span class="n">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">:gen_statem</span><span class="o">.</span><span class="n">receive_response</span><span class="p" data-group-id="0967025338-3">(</span><span class="n">req</span><span class="p">,</span><span class="w"> </span><span class="n">timeout</span><span class="p" data-group-id="0967025338-3">)</span></code></pre><p>where <code class="inline">request</code> is a map describing the request to run - see <a href="Nostrum.Api.html"><code class="inline">Nostrum.Api</code></a>
for more information. You can also send multiple requests at the same time
and wait for their response: see <a href="https://www.erlang.org/doc/man/gen_statem.html#reqids_add-3"><code class="inline">:gen_statem.reqids_add/3</code></a> and
<a href="https://www.erlang.org/doc/man/gen_statem.html#wait_response-3"><code class="inline">:gen_statem.wait_response/3</code></a> for more information.</p><h2 id="module-multi-node" class="section-heading">
Expand Down
242 changes: 121 additions & 121 deletions Nostrum.Api.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Nostrum.Cache.ChannelGuildMapping.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ <h1>
<p>By default, nostrum will use <a href="Nostrum.Cache.ChannelGuildMapping.ETS.html"><code class="inline">Elixir.Nostrum.Cache.ChannelGuildMapping.ETS</code></a> to store the
mapping. To override this, set the <code class="inline">[:caches, :channel_guild_mapping]</code>
setting on nostrum's application configuration:</p><pre><code class="makeup elixir" translate="no"><span class="n">config</span><span class="w"> </span><span class="ss">:nostrum</span><span class="p">,</span><span class="w">
</span><span class="ss">caches</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2527357992-1">%{</span><span class="w">
</span><span class="ss">caches</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2027103621-1">%{</span><span class="w">
</span><span class="ss">channel_guild_mapping</span><span class="p">:</span><span class="w"> </span><span class="nc">MyBot.Nostrum.Cache.ChannelGuildMapping</span><span class="w">
</span><span class="p" data-group-id="2527357992-1">}</span></code></pre><p>This setting must be set at compile time.</p>
</span><span class="p" data-group-id="2027103621-1">}</span></code></pre><p>This setting must be set at compile time.</p>
</section>

</div>
Expand Down
8 changes: 4 additions & 4 deletions Nostrum.Cache.MessageCache.Mnesia.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ <h1>
that the table cannot be changed to only store its contents on disk later.
default: <code class="inline">:ordered_set</code></li></ul><p>To change this configuration, you can add the following to your
<code class="inline">config.exs</code>:</p><pre><code class="makeup elixir" translate="no"><span class="n">config</span><span class="w"> </span><span class="ss">:nostrum</span><span class="p">,</span><span class="w">
</span><span class="ss">caches</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5770483619-1">%{</span><span class="w">
</span><span class="ss">messages</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5770483619-2">{</span><span class="nc">Nostrum.Cache.MessageCache.Mnesia</span><span class="p">,</span><span class="w">
</span><span class="ss">caches</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1692231227-1">%{</span><span class="w">
</span><span class="ss">messages</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1692231227-2">{</span><span class="nc">Nostrum.Cache.MessageCache.Mnesia</span><span class="p">,</span><span class="w">
</span><span class="ss">size_limit</span><span class="p">:</span><span class="w"> </span><span class="mi">1000</span><span class="p">,</span><span class="w"> </span><span class="ss">eviction_count</span><span class="p">:</span><span class="w"> </span><span class="mi">50</span><span class="p">,</span><span class="w">
</span><span class="ss">table_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:my_custom_messages_table_name</span><span class="p">,</span><span class="w">
</span><span class="ss">compressed</span><span class="p">:</span><span class="w"> </span><span class="no">true</span><span class="p">,</span><span class="w"> </span><span class="ss">type</span><span class="p">:</span><span class="w"> </span><span class="ss">:set</span><span class="p" data-group-id="5770483619-2">}</span><span class="w">
</span><span class="p" data-group-id="5770483619-1">}</span></code></pre><p>You can also change the table name used by the cache by setting the
</span><span class="ss">compressed</span><span class="p">:</span><span class="w"> </span><span class="no">true</span><span class="p">,</span><span class="w"> </span><span class="ss">type</span><span class="p">:</span><span class="w"> </span><span class="ss">:set</span><span class="p" data-group-id="1692231227-2">}</span><span class="w">
</span><span class="p" data-group-id="1692231227-1">}</span></code></pre><p>You can also change the table name used by the cache by setting the
<code class="inline">table_name</code> field in the configuration for the <code class="inline">messages</code> cache.</p>
</section>

Expand Down
10 changes: 5 additions & 5 deletions Nostrum.Cache.PresenceCache.html
Original file line number Diff line number Diff line change
Expand Up @@ -582,12 +582,12 @@ <h1 class="signature" translate="no">get(guild_id, user_id)</h1>
</a>
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="k">case</span><span class="w"> </span><span class="nc">Nostrum.Cache.PresenceCache</span><span class="o">.</span><span class="n">get</span><span class="p" data-group-id="5845340559-1">(</span><span class="mi">111133335555</span><span class="p">,</span><span class="w"> </span><span class="mi">222244446666</span><span class="p" data-group-id="5845340559-1">)</span><span class="w"> </span><span class="k" data-group-id="5845340559-2">do</span><span class="w">
</span><span class="p" data-group-id="5845340559-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="n">presence</span><span class="p" data-group-id="5845340559-3">}</span><span class="w"> </span><span class="o">-&gt;</span><span class="w">
</span><span class="s">&quot;They&#39;re </span><span class="si" data-group-id="5845340559-4">#{</span><span class="n">presence</span><span class="o">.</span><span class="n">status</span><span class="si" data-group-id="5845340559-4">}</span><span class="s">&quot;</span><span class="w">
</span><span class="p" data-group-id="5845340559-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="c">_reason</span><span class="p" data-group-id="5845340559-5">}</span><span class="w"> </span><span class="o">-&gt;</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="k">case</span><span class="w"> </span><span class="nc">Nostrum.Cache.PresenceCache</span><span class="o">.</span><span class="n">get</span><span class="p" data-group-id="9707750107-1">(</span><span class="mi">111133335555</span><span class="p">,</span><span class="w"> </span><span class="mi">222244446666</span><span class="p" data-group-id="9707750107-1">)</span><span class="w"> </span><span class="k" data-group-id="9707750107-2">do</span><span class="w">
</span><span class="p" data-group-id="9707750107-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="n">presence</span><span class="p" data-group-id="9707750107-3">}</span><span class="w"> </span><span class="o">-&gt;</span><span class="w">
</span><span class="s">&quot;They&#39;re </span><span class="si" data-group-id="9707750107-4">#{</span><span class="n">presence</span><span class="o">.</span><span class="n">status</span><span class="si" data-group-id="9707750107-4">}</span><span class="s">&quot;</span><span class="w">
</span><span class="p" data-group-id="9707750107-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="c">_reason</span><span class="p" data-group-id="9707750107-5">}</span><span class="w"> </span><span class="o">-&gt;</span><span class="w">
</span><span class="s">&quot;They&#39;re dead Jim&quot;</span><span class="w">
</span><span class="k" data-group-id="5845340559-2">end</span></code></pre>
</span><span class="k" data-group-id="9707750107-2">end</span></code></pre>
</section>
</section>
<section class="detail" id="get!/3">
Expand Down
8 changes: 4 additions & 4 deletions Nostrum.Cache.UserCache.html
Original file line number Diff line number Diff line change
Expand Up @@ -530,12 +530,12 @@ <h1 class="signature" translate="no">get(id)</h1>
</a>
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="k">case</span><span class="w"> </span><span class="nc">Nostrum.Cache.UserCache</span><span class="o">.</span><span class="n">get</span><span class="p" data-group-id="9152194666-1">(</span><span class="mi">1111222233334444</span><span class="p" data-group-id="9152194666-1">)</span><span class="w"> </span><span class="k" data-group-id="9152194666-2">do</span><span class="w">
</span><span class="p" data-group-id="9152194666-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="n">user</span><span class="p" data-group-id="9152194666-3">}</span><span class="w"> </span><span class="o">-&gt;</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="k">case</span><span class="w"> </span><span class="nc">Nostrum.Cache.UserCache</span><span class="o">.</span><span class="n">get</span><span class="p" data-group-id="1077962802-1">(</span><span class="mi">1111222233334444</span><span class="p" data-group-id="1077962802-1">)</span><span class="w"> </span><span class="k" data-group-id="1077962802-2">do</span><span class="w">
</span><span class="p" data-group-id="1077962802-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="n">user</span><span class="p" data-group-id="1077962802-3">}</span><span class="w"> </span><span class="o">-&gt;</span><span class="w">
</span><span class="s">&quot;We found &quot;</span><span class="w"> </span><span class="o">&lt;&gt;</span><span class="w"> </span><span class="n">user</span><span class="o">.</span><span class="n">username</span><span class="w">
</span><span class="p" data-group-id="9152194666-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="c">_reason</span><span class="p" data-group-id="9152194666-4">}</span><span class="w"> </span><span class="o">-&gt;</span><span class="w">
</span><span class="p" data-group-id="1077962802-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="c">_reason</span><span class="p" data-group-id="1077962802-4">}</span><span class="w"> </span><span class="o">-&gt;</span><span class="w">
</span><span class="s">&quot;No es bueno&quot;</span><span class="w">
</span><span class="k" data-group-id="9152194666-2">end</span></code></pre>
</span><span class="k" data-group-id="1077962802-2">end</span></code></pre>
</section>
</section>
<section class="detail" id="get!/1">
Expand Down
Loading

0 comments on commit b1a8770

Please sign in to comment.