Skip to content

Commit

Permalink
Deploying to gh-pages from @ 4179b3a 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
jchristgit committed Aug 17, 2024
1 parent d15d961 commit f18e94f
Show file tree
Hide file tree
Showing 47 changed files with 719 additions and 719 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-7691E775.js
dist/search_data-161E7428.js
dist/sidebar_items-35424368.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="1512057432-1">(</span><span class="nc">Nostrum.Api.Ratelimiter</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1512057432-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="1512057432-2">}</span><span class="p" data-group-id="1512057432-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="6726194438-1">(</span><span class="nc">Nostrum.Api.Ratelimiter</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6726194438-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="6726194438-2">}</span><span class="p" data-group-id="6726194438-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="1512057432-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="1512057432-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="6726194438-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="6726194438-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="9027502323-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="1261572296-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="9027502323-1">}</span></code></pre><p>This setting must be set at compile time.</p>
</span><span class="p" data-group-id="1261572296-1">}</span></code></pre><p>This setting must be set at compile time.</p>
</section>

</div>
Expand Down
28 changes: 14 additions & 14 deletions Nostrum.Cache.GuildCache.ETS.html
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ <h1 class="section-heading">
</a>
<h1 class="signature" translate="no">channel_create(guild_id, channel)</h1>

<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L94" class="icon-action" rel="help" title="View Source">
<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L100" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
Expand Down Expand Up @@ -414,7 +414,7 @@ <h1 class="signature" translate="no">channel_create(guild_id, channel)</h1>
</a>
<h1 class="signature" translate="no">channel_delete(guild_id, channel_id)</h1>

<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L106" class="icon-action" rel="help" title="View Source">
<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L112" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
Expand Down Expand Up @@ -445,7 +445,7 @@ <h1 class="signature" translate="no">channel_delete(guild_id, channel_id)</h1>
</a>
<h1 class="signature" translate="no">channel_update(guild_id, channel)</h1>

<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L117" class="icon-action" rel="help" title="View Source">
<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L123" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
Expand Down Expand Up @@ -530,7 +530,7 @@ <h1 class="signature" translate="no">create(payload)</h1>
</a>
<h1 class="signature" translate="no">delete(guild_id)</h1>

<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L83" class="icon-action" rel="help" title="View Source">
<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L89" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
Expand Down Expand Up @@ -560,7 +560,7 @@ <h1 class="signature" translate="no">delete(guild_id)</h1>
</a>
<h1 class="signature" translate="no">emoji_update(guild_id, emojis)</h1>

<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L131" class="icon-action" rel="help" title="View Source">
<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L137" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
Expand Down Expand Up @@ -646,7 +646,7 @@ <h1 class="signature" translate="no">init(init_arg)</h1>
</a>
<h1 class="signature" translate="no">member_count_down(guild_id)</h1>

<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L224" class="icon-action" rel="help" title="View Source">
<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L230" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
Expand Down Expand Up @@ -676,7 +676,7 @@ <h1 class="signature" translate="no">member_count_down(guild_id)</h1>
</a>
<h1 class="signature" translate="no">member_count_up(guild_id)</h1>

<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L209" class="icon-action" rel="help" title="View Source">
<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L215" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
Expand Down Expand Up @@ -706,7 +706,7 @@ <h1 class="signature" translate="no">member_count_up(guild_id)</h1>
</a>
<h1 class="signature" translate="no">query_handle()</h1>

<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L239" class="icon-action" rel="help" title="View Source">
<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L245" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
Expand Down Expand Up @@ -736,7 +736,7 @@ <h1 class="signature" translate="no">query_handle()</h1>
</a>
<h1 class="signature" translate="no">role_create(guild_id, role)</h1>

<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L153" class="icon-action" rel="help" title="View Source">
<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L159" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
Expand Down Expand Up @@ -767,7 +767,7 @@ <h1 class="signature" translate="no">role_create(guild_id, role)</h1>
</a>
<h1 class="signature" translate="no">role_delete(guild_id, role_id)</h1>

<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L164" class="icon-action" rel="help" title="View Source">
<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L170" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
Expand Down Expand Up @@ -798,7 +798,7 @@ <h1 class="signature" translate="no">role_delete(guild_id, role_id)</h1>
</a>
<h1 class="signature" translate="no">role_update(guild_id, role)</h1>

<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L175" class="icon-action" rel="help" title="View Source">
<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L181" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
Expand Down Expand Up @@ -854,7 +854,7 @@ <h1 class="signature" translate="no">start_link(init_arg)</h1>
</a>
<h1 class="signature" translate="no">stickers_update(guild_id, stickers)</h1>

<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L142" class="icon-action" rel="help" title="View Source">
<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L148" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
Expand Down Expand Up @@ -929,7 +929,7 @@ <h1 class="signature" translate="no">update(payload)</h1>

<div class="specs">

<pre translate="no"><span class="attribute">@spec</span> update(<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>()) :: {<a href="Nostrum.Struct.Guild.html#t:t/0">Nostrum.Struct.Guild.t</a>(), <a href="Nostrum.Struct.Guild.html#t:t/0">Nostrum.Struct.Guild.t</a>()}</pre>
<pre translate="no"><span class="attribute">@spec</span> update(<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>()) :: {<a href="Nostrum.Struct.Guild.html#t:t/0">Nostrum.Struct.Guild.t</a>() | nil, <a href="Nostrum.Struct.Guild.html#t:t/0">Nostrum.Struct.Guild.t</a>()}</pre>

</div>

Expand All @@ -945,7 +945,7 @@ <h1 class="signature" translate="no">update(payload)</h1>
</a>
<h1 class="signature" translate="no">voice_state_update(guild_id, payload)</h1>

<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L186" class="icon-action" rel="help" title="View Source">
<a href="https://github.com/Kraigie/nostrum/blob/master/lib/nostrum/cache/guild_cache/ets.ex#L192" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
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="1468720220-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="1468720220-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="1211642312-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="1211642312-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="1468720220-2">}</span><span class="w">
</span><span class="p" data-group-id="1468720220-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="1211642312-2">}</span><span class="w">
</span><span class="p" data-group-id="1211642312-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 @@ -638,12 +638,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="2251635698-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="2251635698-1">)</span><span class="w"> </span><span class="k" data-group-id="2251635698-2">do</span><span class="w">
</span><span class="p" data-group-id="2251635698-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="2251635698-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="2251635698-4">#{</span><span class="n">presence</span><span class="o">.</span><span class="n">status</span><span class="si" data-group-id="2251635698-4">}</span><span class="s">&quot;</span><span class="w">
</span><span class="p" data-group-id="2251635698-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="2251635698-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="5651831135-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="5651831135-1">)</span><span class="w"> </span><span class="k" data-group-id="5651831135-2">do</span><span class="w">
</span><span class="p" data-group-id="5651831135-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="5651831135-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="5651831135-4">#{</span><span class="n">presence</span><span class="o">.</span><span class="n">status</span><span class="si" data-group-id="5651831135-4">}</span><span class="s">&quot;</span><span class="w">
</span><span class="p" data-group-id="5651831135-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="5651831135-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="2251635698-2">end</span></code></pre>
</span><span class="k" data-group-id="5651831135-2">end</span></code></pre>
</section>
</section>
<section class="detail" id="get!/3">
Expand Down
Loading

0 comments on commit f18e94f

Please sign in to comment.