Skip to content

Commit

Permalink
automatic commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Docs Deployment Bot committed Nov 26, 2023
1 parent 75e8bce commit 419a682
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions clearing_slashcommands.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@
<dl class="section note"><dt>Note</dt><dd>Clearing <b>global commands</b> will only clear commands that were <b>made globally</b>, same goes for the opposite way round. The example will demonstrate using both functions.</dd></dl>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;dpp/dpp.h&gt;</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main()</div>
<div class="line">{</div>
<div class="line"><span class="keywordtype">int</span> main() {</div>
<div class="line"> <a class="code hl_class" href="classdpp_1_1cluster.html">dpp::cluster</a> bot(<span class="stringliteral">&quot;token&quot;</span>);</div>
<div class="line"> </div>
<div class="line"> bot.on_log(<a class="code hl_function" href="namespacedpp_1_1utility.html#a8c2cc04bb80ffd287b376d5977899277">dpp::utility::cout_logger</a>());</div>
Expand All @@ -117,7 +116,7 @@
<div class="line"> <span class="keywordflow">if</span> (dpp::run_once&lt;struct clear_bot_commands&gt;()) {</div>
<div class="line"> <span class="comment">/* Now, we&#39;re going to wipe our commands */</span></div>
<div class="line"> bot.global_bulk_command_delete();</div>
<div class="line"> <span class="comment">/* This one requires a guild id, otherwise it won&#39;t what guild&#39;s commands it needs to wipe! */</span></div>
<div class="line"> <span class="comment">/* This one requires a guild id, otherwise it won&#39;t know what guild&#39;s commands it needs to wipe! */</span></div>
<div class="line"> bot.guild_bulk_command_delete(857692897221033129);</div>
<div class="line"> }</div>
<div class="line"> </div>
Expand Down
5 changes: 2 additions & 3 deletions xml/clearing_slashcommands.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
</simplesect>
<programlisting filename="clearing_slashcommands.cpp"><codeline><highlight class="preprocessor">#include<sp/>&lt;dpp/dpp.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline><highlight class="normal"></highlight></codeline>
<codeline><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>main()</highlight></codeline>
<codeline><highlight class="normal">{</highlight></codeline>
<codeline><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>main()<sp/>{</highlight></codeline>
<codeline><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classdpp_1_1cluster" kindref="compound">dpp::cluster</ref><sp/>bot(</highlight><highlight class="stringliteral">&quot;token&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline><highlight class="normal"></highlight></codeline>
<codeline><highlight class="normal"><sp/><sp/><sp/><sp/>bot.on_log(<ref refid="namespacedpp_1_1utility_1a8c2cc04bb80ffd287b376d5977899277" kindref="member">dpp::utility::cout_logger</ref>());</highlight></codeline>
Expand All @@ -23,7 +22,7 @@
<codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dpp::run_once&lt;struct<sp/>clear_bot_commands&gt;())<sp/>{</highlight></codeline>
<codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Now,<sp/>we&apos;re<sp/>going<sp/>to<sp/>wipe<sp/>our<sp/>commands<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bot.global_bulk_command_delete();</highlight></codeline>
<codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>This<sp/>one<sp/>requires<sp/>a<sp/>guild<sp/>id,<sp/>otherwise<sp/>it<sp/>won&apos;t<sp/>what<sp/>guild&apos;s<sp/>commands<sp/>it<sp/>needs<sp/>to<sp/>wipe!<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>This<sp/>one<sp/>requires<sp/>a<sp/>guild<sp/>id,<sp/>otherwise<sp/>it<sp/>won&apos;t<sp/>know<sp/>what<sp/>guild&apos;s<sp/>commands<sp/>it<sp/>needs<sp/>to<sp/>wipe!<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bot.guild_bulk_command_delete(857692897221033129);</highlight></codeline>
<codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline><highlight class="normal"></highlight></codeline>
Expand Down

0 comments on commit 419a682

Please sign in to comment.