diff options
Diffstat (limited to 'output/botcore.utils.html')
-rw-r--r-- | output/botcore.utils.html | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/output/botcore.utils.html b/output/botcore.utils.html index a49833e0..f4dd4335 100644 --- a/output/botcore.utils.html +++ b/output/botcore.utils.html @@ -6,7 +6,7 @@ <link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="caching" href="botcore.utils.caching.html" /><link rel="prev" title="Exts" href="botcore.exts.html" /> <link rel="shortcut icon" href="https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_full/logo_full.min.svg"/><meta name="generator" content="sphinx-4.4.0, furo 2022.02.23"/> - <title>Utils - Bot Core v2.1.0</title> + <title>Utils - Bot Core v3.0.0</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=3c656993158f05539f962c5cea52a5e6c184bb8c" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?digest=25ceb02ed1c46dc30f2321ff83e92799f69dfdb9" /> @@ -122,7 +122,7 @@ </label> </div> <div class="header-center"> - <a href="../index.html"><div class="brand">Bot Core v2.1.0</div></a> + <a href="../index.html"><div class="brand">Bot Core v3.0.0</div></a> </div> <div class="header-right"> <div class="theme-toggle-container theme-toggle-header"> @@ -148,7 +148,7 @@ <img class="sidebar-logo" src="https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_full/logo_full.min.svg" alt="Logo"/> </div> - <span class="sidebar-brand-text">Bot Core v2.1.0</span> + <span class="sidebar-brand-text">Bot Core v3.0.0</span> </a><form class="sidebar-search-container" method="get" action="../search.html" role="search"> <input class="sidebar-search" placeholder=Search name="q" aria-label="Search"> @@ -166,7 +166,6 @@ <li class="toctree-l3"><a class="reference internal" href="botcore.utils.extensions.html">extensions</a></li> <li class="toctree-l3"><a class="reference internal" href="botcore.utils.logging.html">logging</a></li> <li class="toctree-l3"><a class="reference internal" href="botcore.utils.members.html">members</a></li> -<li class="toctree-l3"><a class="reference internal" href="botcore.utils.monkey_patches.html">monkey_patches</a></li> <li class="toctree-l3"><a class="reference internal" href="botcore.utils.regex.html">regex</a></li> <li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> </ul> @@ -213,6 +212,24 @@ <section id="module-botcore.utils"> <span id="utils"></span><h1>Utils<a class="headerlink" href="#module-botcore.utils" title="Permalink to this headline">#</a></h1> <p>Useful utilities and tools for Discord bot development.</p> +<dl class="py function"> +<dt class="sig sig-object py" id="botcore.utils.apply_monkey_patches"> +<span class="sig-name descname"><span class="pre">apply_monkey_patches</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/a96f9e3c2120c4484726e01dd355f775ac4eabcd/botcore/utils/__init__.py#L6-L20"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.apply_monkey_patches" title="Permalink to this definition">#</a></dt> +<dd><p>Applies all common monkey patches for our bots.</p> +<dl> +<dt>Patches <a class="reference external" href="https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.ext.commands.Command" title="(in disnake v2.5.0a)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">disnake.ext.commands.Command</span></code></a> and <a class="reference external" href="https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.ext.commands.Group" title="(in disnake v2.5.0a)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">disnake.ext.commands.Group</span></code></a> to support root aliases.</dt><dd><p>A <code class="docutils literal notranslate"><span class="pre">root_aliases</span></code> keyword argument is added to these two objects, which is a sequence of alias names +that will act as top-level groups rather than being aliases of the command’s group.</p> +<p>It’s stored as an attribute also named <code class="docutils literal notranslate"><span class="pre">root_aliases</span></code></p> +</dd> +<dt>Patches disnake’s internal <code class="docutils literal notranslate"><span class="pre">send_typing</span></code> method so that it ignores 403 errors from Discord.</dt><dd><p>When under heavy load Discord has added a CloudFlare worker to this route, which causes 403 errors to be thrown.</p> +</dd> +</dl> +<dl class="field-list simple"> +<dt class="field-odd">Return type</dt> +<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.10)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></a></p> +</dd> +</dl> +</dd></dl> <section id="submodules"> <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">#</a></h2> <div class="toctree-wrapper compound"> @@ -222,7 +239,6 @@ <li class="toctree-l1"><a class="reference internal" href="botcore.utils.extensions.html">extensions</a></li> <li class="toctree-l1"><a class="reference internal" href="botcore.utils.logging.html">logging</a></li> <li class="toctree-l1"><a class="reference internal" href="botcore.utils.members.html">members</a></li> -<li class="toctree-l1"><a class="reference internal" href="botcore.utils.monkey_patches.html">monkey_patches</a></li> <li class="toctree-l1"><a class="reference internal" href="botcore.utils.regex.html">regex</a></li> <li class="toctree-l1"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> </ul> |