diff options
33 files changed, 615 insertions, 84 deletions
@@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 302c6df3716429e3e0b01fc186c40268 +config: 3de32f855153d26a2d342527725c2a40 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle Binary files differindex e22d6319..322cc2f0 100644 --- a/.doctrees/environment.pickle +++ b/.doctrees/environment.pickle diff --git a/.doctrees/output/botcore.doctree b/.doctrees/output/botcore.doctree Binary files differindex c41e1eee..47712525 100644 --- a/.doctrees/output/botcore.doctree +++ b/.doctrees/output/botcore.doctree diff --git a/.doctrees/output/botcore.site_api.doctree b/.doctrees/output/botcore.site_api.doctree Binary files differnew file mode 100644 index 00000000..ffdb3f70 --- /dev/null +++ b/.doctrees/output/botcore.site_api.doctree diff --git a/.doctrees/output/botcore.utils.caching.doctree b/.doctrees/output/botcore.utils.caching.doctree Binary files differindex bb12b32a..baeab89e 100644 --- a/.doctrees/output/botcore.utils.caching.doctree +++ b/.doctrees/output/botcore.utils.caching.doctree diff --git a/.doctrees/output/botcore.utils.channel.doctree b/.doctrees/output/botcore.utils.channel.doctree Binary files differindex 8662b27c..29794c3e 100644 --- a/.doctrees/output/botcore.utils.channel.doctree +++ b/.doctrees/output/botcore.utils.channel.doctree diff --git a/.doctrees/output/botcore.utils.extensions.doctree b/.doctrees/output/botcore.utils.extensions.doctree Binary files differindex 2e3b8fc0..7242f280 100644 --- a/.doctrees/output/botcore.utils.extensions.doctree +++ b/.doctrees/output/botcore.utils.extensions.doctree diff --git a/.doctrees/output/botcore.utils.logging.doctree b/.doctrees/output/botcore.utils.logging.doctree Binary files differindex 770475eb..c24e101d 100644 --- a/.doctrees/output/botcore.utils.logging.doctree +++ b/.doctrees/output/botcore.utils.logging.doctree diff --git a/.doctrees/output/botcore.utils.members.doctree b/.doctrees/output/botcore.utils.members.doctree Binary files differindex 06b68b00..3c58aa34 100644 --- a/.doctrees/output/botcore.utils.members.doctree +++ b/.doctrees/output/botcore.utils.members.doctree diff --git a/.doctrees/output/botcore.utils.monkey_patches.doctree b/.doctrees/output/botcore.utils.monkey_patches.doctree Binary files differindex e56d2083..819fa4da 100644 --- a/.doctrees/output/botcore.utils.monkey_patches.doctree +++ b/.doctrees/output/botcore.utils.monkey_patches.doctree diff --git a/.doctrees/output/botcore.utils.regex.doctree b/.doctrees/output/botcore.utils.regex.doctree Binary files differindex 886d169f..f89da4c0 100644 --- a/.doctrees/output/botcore.utils.regex.doctree +++ b/.doctrees/output/botcore.utils.regex.doctree diff --git a/.doctrees/output/botcore.utils.scheduling.doctree b/.doctrees/output/botcore.utils.scheduling.doctree Binary files differindex ddb7af57..0d6f6066 100644 --- a/.doctrees/output/botcore.utils.scheduling.doctree +++ b/.doctrees/output/botcore.utils.scheduling.doctree diff --git a/_sources/output/botcore.rst.txt b/_sources/output/botcore.rst.txt index 55faa144..f537106b 100644 --- a/_sources/output/botcore.rst.txt +++ b/_sources/output/botcore.rst.txt @@ -14,3 +14,11 @@ Subpackages botcore.exts botcore.utils + +Submodules +---------- + +.. toctree:: + :maxdepth: 4 + + botcore.site_api diff --git a/_sources/output/botcore.site_api.rst.txt b/_sources/output/botcore.site_api.rst.txt new file mode 100644 index 00000000..2399bbc4 --- /dev/null +++ b/_sources/output/botcore.site_api.rst.txt @@ -0,0 +1,7 @@ +site\_api +======================== + +.. automodule:: botcore.site_api + :members: + :special-members: + :show-inheritance: diff --git a/_static/documentation_options.js b/_static/documentation_options.js index 5a94801b..1cccfc07 100644 --- a/_static/documentation_options.js +++ b/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '2.0.0', + VERSION: '2.1.0', LANGUAGE: 'None', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/genindex.html b/genindex.html index f49a7feb..120a4cc5 100644 --- a/genindex.html +++ b/genindex.html @@ -4,7 +4,7 @@ <meta name="viewport" content="width=device-width,initial-scale=1"/> <meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="#" /><link rel="search" title="Search" href="search.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>Index - Bot Core v2.0.0</title> + <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>Index - Bot Core v2.1.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" /> @@ -120,7 +120,7 @@ </label> </div> <div class="header-center"> - <a href="index.html"><div class="brand">Bot Core v2.0.0</div></a> + <a href="index.html"><div class="brand">Bot Core v2.1.0</div></a> </div> <div class="header-right"> <div class="theme-toggle-container theme-toggle-header"> @@ -146,7 +146,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.0.0</span> + <span class="sidebar-brand-text">Bot Core v2.1.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"> @@ -169,6 +169,7 @@ <li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.scheduling.html">scheduling</a></li> </ul> </li> +<li class="toctree-l2"><a class="reference internal" href="output/botcore.site_api.html">site_api</a></li> </ul> </li> </ul> @@ -210,7 +211,7 @@ <section class="genindex-section"> <h1 id="index">Index</h1> - <div class="genindex-jumpbox"><a href="#_"><strong>_</strong></a> | <a href="#A"><strong>A</strong></a> | <a href="#B"><strong>B</strong></a> | <a href="#C"><strong>C</strong></a> | <a href="#D"><strong>D</strong></a> | <a href="#F"><strong>F</strong></a> | <a href="#G"><strong>G</strong></a> | <a href="#H"><strong>H</strong></a> | <a href="#I"><strong>I</strong></a> | <a href="#M"><strong>M</strong></a> | <a href="#R"><strong>R</strong></a> | <a href="#S"><strong>S</strong></a> | <a href="#T"><strong>T</strong></a> | <a href="#U"><strong>U</strong></a> | <a href="#W"><strong>W</strong></a></div> + <div class="genindex-jumpbox"><a href="#_"><strong>_</strong></a> | <a href="#A"><strong>A</strong></a> | <a href="#B"><strong>B</strong></a> | <a href="#C"><strong>C</strong></a> | <a href="#D"><strong>D</strong></a> | <a href="#F"><strong>F</strong></a> | <a href="#G"><strong>G</strong></a> | <a href="#H"><strong>H</strong></a> | <a href="#I"><strong>I</strong></a> | <a href="#M"><strong>M</strong></a> | <a href="#P"><strong>P</strong></a> | <a href="#R"><strong>R</strong></a> | <a href="#S"><strong>S</strong></a> | <a href="#T"><strong>T</strong></a> | <a href="#U"><strong>U</strong></a> | <a href="#W"><strong>W</strong></a></div> </section> <section id="_" class="genindex-section"> <h2>_</h2> @@ -220,15 +221,21 @@ </li> <li><a href="output/botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler.__contains__">__contains__() (Scheduler method)</a> </li> - </ul></td> - <td style="width: 33%; vertical-align: top;"><ul> - <li><a href="output/botcore.utils.caching.html#botcore.utils.caching.AsyncCache.__init__">__init__() (AsyncCache method)</a> + <li><a href="output/botcore.site_api.html#botcore.site_api.APIClient.__init__">__init__() (APIClient method)</a> <ul> + <li><a href="output/botcore.utils.caching.html#botcore.utils.caching.AsyncCache.__init__">(AsyncCache method)</a> +</li> + <li><a href="output/botcore.site_api.html#botcore.site_api.ResponseCodeError.__init__">(ResponseCodeError method)</a> +</li> <li><a href="output/botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler.__init__">(Scheduler method)</a> </li> </ul></li> </ul></td> + <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.site_api.html#botcore.site_api.ResponseCodeError.__str__">__str__() (ResponseCodeError method)</a> +</li> + </ul></td> </tr></table> </section> @@ -236,10 +243,12 @@ <h2>A</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%; vertical-align: top;"><ul> - <li><a href="output/botcore.utils.monkey_patches.html#botcore.utils.monkey_patches.apply_monkey_patches">apply_monkey_patches() (in module botcore.utils.monkey_patches)</a> + <li><a href="output/botcore.site_api.html#botcore.site_api.APIClient">APIClient (class in botcore.site_api)</a> </li> </ul></td> <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.utils.monkey_patches.html#botcore.utils.monkey_patches.apply_monkey_patches">apply_monkey_patches() (in module botcore.utils.monkey_patches)</a> +</li> <li><a href="output/botcore.utils.caching.html#botcore.utils.caching.AsyncCache">AsyncCache (class in botcore.utils.caching)</a> </li> </ul></td> @@ -265,6 +274,13 @@ </li> </ul></li> <li> + botcore.site_api + + <ul> + <li><a href="output/botcore.site_api.html#module-botcore.site_api">module</a> +</li> + </ul></li> + <li> botcore.utils <ul> @@ -285,6 +301,8 @@ <li><a href="output/botcore.utils.channel.html#module-botcore.utils.channel">module</a> </li> </ul></li> + </ul></td> + <td style="width: 33%; vertical-align: top;"><ul> <li> botcore.utils.extensions @@ -292,8 +310,6 @@ <li><a href="output/botcore.utils.extensions.html#module-botcore.utils.extensions">module</a> </li> </ul></li> - </ul></td> - <td style="width: 33%; vertical-align: top;"><ul> <li> botcore.utils.logging @@ -341,9 +357,11 @@ </li> <li><a href="output/botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler.cancel_all">cancel_all() (Scheduler method)</a> </li> + <li><a href="output/botcore.utils.caching.html#botcore.utils.caching.AsyncCache.clear">clear() (AsyncCache method)</a> +</li> </ul></td> <td style="width: 33%; vertical-align: top;"><ul> - <li><a href="output/botcore.utils.caching.html#botcore.utils.caching.AsyncCache.clear">clear() (AsyncCache method)</a> + <li><a href="output/botcore.site_api.html#botcore.site_api.APIClient.close">close() (APIClient method)</a> </li> <li><a href="output/botcore.utils.scheduling.html#botcore.utils.scheduling.create_task">create_task() (in module botcore.utils.scheduling)</a> </li> @@ -357,6 +375,10 @@ <h2>D</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.site_api.html#botcore.site_api.APIClient.delete">delete() (APIClient method)</a> +</li> + </ul></td> + <td style="width: 33%; vertical-align: top;"><ul> <li><a href="output/botcore.utils.regex.html#botcore.utils.regex.DISCORD_INVITE">DISCORD_INVITE (in module botcore.utils.regex)</a> </li> </ul></td> @@ -377,6 +399,8 @@ <h2>G</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.site_api.html#botcore.site_api.APIClient.get">get() (APIClient method)</a> +</li> <li><a href="output/botcore.utils.logging.html#botcore.utils.logging.get_logger">get_logger() (in module botcore.utils.logging)</a> </li> </ul></td> @@ -413,6 +437,8 @@ <h2>M</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.site_api.html#botcore.site_api.APIClient.maybe_raise_for_status">maybe_raise_for_status() (APIClient method)</a> +</li> <li> module @@ -421,6 +447,8 @@ </li> <li><a href="output/botcore.exts.html#module-botcore.exts">botcore.exts</a> </li> + <li><a href="output/botcore.site_api.html#module-botcore.site_api">botcore.site_api</a> +</li> <li><a href="output/botcore.utils.html#module-botcore.utils">botcore.utils</a> </li> <li><a href="output/botcore.utils.caching.html#module-botcore.utils.caching">botcore.utils.caching</a> @@ -444,6 +472,22 @@ </tr></table> </section> +<section id="P" class="genindex-section"> + <h2>P</h2> + <table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.site_api.html#botcore.site_api.APIClient.patch">patch() (APIClient method)</a> +</li> + </ul></td> + <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.site_api.html#botcore.site_api.APIClient.post">post() (APIClient method)</a> +</li> + <li><a href="output/botcore.site_api.html#botcore.site_api.APIClient.put">put() (APIClient method)</a> +</li> + </ul></td> + </tr></table> +</section> + <section id="R" class="genindex-section"> <h2>R</h2> <table style="width: 100%" class="indextable genindextable"><tr> @@ -451,6 +495,12 @@ <li><a href="output/botcore.utils.regex.html#botcore.utils.regex.RAW_CODE_REGEX">RAW_CODE_REGEX (in module botcore.utils.regex)</a> </li> </ul></td> + <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.site_api.html#botcore.site_api.APIClient.request">request() (APIClient method)</a> +</li> + <li><a href="output/botcore.site_api.html#botcore.site_api.ResponseCodeError">ResponseCodeError</a> +</li> + </ul></td> </tr></table> </section> @@ -6,7 +6,7 @@ <link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Botcore" href="output/botcore.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>Bot Core v2.0.0</title> + <title>Bot Core v2.1.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="#"><div class="brand">Bot Core v2.0.0</div></a> + <a href="#"><div class="brand">Bot Core v2.1.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.0.0</span> + <span class="sidebar-brand-text">Bot Core v2.1.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"> @@ -171,6 +171,7 @@ <li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.scheduling.html">scheduling</a></li> </ul> </li> +<li class="toctree-l2"><a class="reference internal" href="output/botcore.site_api.html">site_api</a></li> </ul> </li> </ul> @@ -226,6 +227,10 @@ </li> </ul> </li> +<li class="toctree-l2"><a class="reference internal" href="output/botcore.html#submodules">Submodules</a><ul> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.site_api.html">site_api</a></li> +</ul> +</li> </ul> </li> </ul> diff --git a/objects.inv b/objects.inv Binary files differindex bbdaf9f6..db63ca1c 100644 --- a/objects.inv +++ b/objects.inv diff --git a/output/botcore.exts.html b/output/botcore.exts.html index b77419ec..530ed5c6 100644 --- a/output/botcore.exts.html +++ b/output/botcore.exts.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="Utils" href="botcore.utils.html" /><link rel="prev" title="Botcore" href="botcore.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>Exts - Bot Core v2.0.0</title> + <title>Exts - Bot Core v2.1.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.0.0</div></a> + <a href="../index.html"><div class="brand">Bot Core v2.1.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.0.0</span> + <span class="sidebar-brand-text">Bot Core v2.1.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"> @@ -171,6 +171,7 @@ <li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> </ul> </li> +<li class="toctree-l2"><a class="reference internal" href="botcore.site_api.html">site_api</a></li> </ul> </li> </ul> diff --git a/output/botcore.html b/output/botcore.html index bc154667..c20bd328 100644 --- a/output/botcore.html +++ b/output/botcore.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="Exts" href="botcore.exts.html" /><link rel="prev" title="Bot Core Project Documentation" href="../index.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>Botcore - Bot Core v2.0.0</title> + <title>Botcore - Bot Core v2.1.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.0.0</div></a> + <a href="../index.html"><div class="brand">Bot Core v2.1.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.0.0</span> + <span class="sidebar-brand-text">Bot Core v2.1.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"> @@ -171,6 +171,7 @@ <li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> </ul> </li> +<li class="toctree-l2"><a class="reference internal" href="botcore.site_api.html">site_api</a></li> </ul> </li> </ul> @@ -234,6 +235,14 @@ </ul> </div> </section> +<section id="submodules"> +<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">#</a></h2> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="botcore.site_api.html">site_api</a></li> +</ul> +</div> +</section> </section> </article> @@ -295,6 +304,7 @@ <ul> <li><a class="reference internal" href="#">Botcore</a><ul> <li><a class="reference internal" href="#subpackages">Subpackages</a></li> +<li><a class="reference internal" href="#submodules">Submodules</a></li> </ul> </li> </ul> diff --git a/output/botcore.site_api.html b/output/botcore.site_api.html new file mode 100644 index 00000000..a43fb6c0 --- /dev/null +++ b/output/botcore.site_api.html @@ -0,0 +1,425 @@ +<!doctype html> +<html class="no-js"> + <head><meta charset="utf-8"/> + <meta name="viewport" content="width=device-width,initial-scale=1"/> + <meta name="color-scheme" content="light dark"><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" /> +<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="prev" title="scheduling" href="botcore.utils.scheduling.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>site_api - Bot Core v2.1.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" /> + <link rel="stylesheet" type="text/css" href="../_static/index.css" /> + <link rel="stylesheet" type="text/css" href="../_static/logo.css" /> + + + + +<style> + body { + --color-code-background: #f8f8f8; + --color-code-foreground: black; + --color-api-name: var(--color-link); + + } + body[data-theme="dark"] { + --color-code-background: #202020; + --color-code-foreground: #d0d0d0; + + } + @media (prefers-color-scheme: dark) { + body:not([data-theme="light"]) { + --color-code-background: #202020; + --color-code-foreground: #d0d0d0; + + } + } +</style></head> + <body> + <script> + document.body.dataset.theme = localStorage.getItem("theme") || "auto"; + </script> + +<svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> + <symbol id="svg-toc" viewBox="0 0 24 24"> + <title>Contents</title> + <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024"> + <path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/> + </svg> + </symbol> + <symbol id="svg-menu" viewBox="0 0 24 24"> + <title>Menu</title> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" + stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu"> + <line x1="3" y1="12" x2="21" y2="12"></line> + <line x1="3" y1="6" x2="21" y2="6"></line> + <line x1="3" y1="18" x2="21" y2="18"></line> + </svg> + </symbol> + <symbol id="svg-arrow-right" viewBox="0 0 24 24"> + <title>Expand</title> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" + stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right"> + <polyline points="9 18 15 12 9 6"></polyline> + </svg> + </symbol> + <symbol id="svg-sun" viewBox="0 0 24 24"> + <title>Light mode</title> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" + stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> + <circle cx="12" cy="12" r="5"></circle> + <line x1="12" y1="1" x2="12" y2="3"></line> + <line x1="12" y1="21" x2="12" y2="23"></line> + <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line> + <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line> + <line x1="1" y1="12" x2="3" y2="12"></line> + <line x1="21" y1="12" x2="23" y2="12"></line> + <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line> + <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line> + </svg> + </symbol> + <symbol id="svg-moon" viewBox="0 0 24 24"> + <title>Dark mode</title> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" + stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> + <path stroke="none" d="M0 0h24v24H0z" fill="none" /> + <path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" /> + </svg> + </symbol> + <symbol id="svg-sun-half" viewBox="0 0 24 24"> + <title>Auto light/dark mode</title> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" + stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow"> + <path stroke="none" d="M0 0h24v24H0z" fill="none"/> + <circle cx="12" cy="12" r="9" /> + <path d="M13 12h5" /> + <path d="M13 15h4" /> + <path d="M13 18h1" /> + <path d="M13 9h4" /> + <path d="M13 6h1" /> + </svg> + </symbol> +</svg> + +<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation"> +<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc"> +<label class="overlay sidebar-overlay" for="__navigation"> + <div class="visually-hidden">Hide navigation sidebar</div> +</label> +<label class="overlay toc-overlay" for="__toc"> + <div class="visually-hidden">Hide table of contents sidebar</div> +</label> + + + +<div class="page"> + <header class="mobile-header"> + <div class="header-left"> + <label class="nav-overlay-icon" for="__navigation"> + <div class="visually-hidden">Toggle site navigation sidebar</div> + <i class="icon"><svg><use href="#svg-menu"></use></svg></i> + </label> + </div> + <div class="header-center"> + <a href="../index.html"><div class="brand">Bot Core v2.1.0</div></a> + </div> + <div class="header-right"> + <div class="theme-toggle-container theme-toggle-header"> + <button class="theme-toggle"> + <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div> + <svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg> + <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg> + <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg> + </button> + </div> + <label class="toc-overlay-icon toc-header-icon no-toc" for="__toc"> + <div class="visually-hidden">Toggle table of contents sidebar</div> + <i class="icon"><svg><use href="#svg-toc"></use></svg></i> + </label> + </div> + </header> + <aside class="sidebar-drawer"> + <div class="sidebar-container"> + + <div class="sidebar-sticky"><a class="sidebar-brand centered" href="../index.html"> + + <div class="sidebar-logo-container"> + <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> + +</a><form class="sidebar-search-container" method="get" action="../search.html" role="search"> + <input class="sidebar-search" placeholder=Search name="q" aria-label="Search"> + <input type="hidden" name="check_keywords" value="yes"> + <input type="hidden" name="area" value="default"> +</form> +<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree"> + <p class="caption" role="heading"><span class="caption-text">Modules:</span></p> +<ul class="current"> +<li class="toctree-l1 current has-children"><a class="reference internal" href="botcore.html">Botcore</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><div class="visually-hidden">Toggle child pages in navigation</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="botcore.exts.html">Exts</a></li> +<li class="toctree-l2 has-children"><a class="reference internal" href="botcore.utils.html">Utils</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle child pages in navigation</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.caching.html">caching</a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.channel.html">channel</a></li> +<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> +</li> +<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">site_api</a></li> +</ul> +</li> +</ul> +<p class="caption" role="heading"><span class="caption-text">Other:</span></p> +<ul> +<li class="toctree-l1"><a class="reference external" href="https://github.com/python-discord/bot-core/blob/main/CHANGELOG.md">Changelog</a></li> +</ul> + +</div> +</div> + + </div> + + </div> + </aside> + <div class="main"> + <div class="content"> + <div class="article-container"> + <a href="#" class="back-to-top muted-link"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> + <path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path> + </svg> + <span>Back to top</span> + </a> + <div class="content-icon-container"><div class="theme-toggle-container theme-toggle-content"> + <button class="theme-toggle"> + <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div> + <svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg> + <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg> + <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg> + </button> + </div> + <label class="toc-overlay-icon toc-content-icon no-toc" for="__toc"> + <div class="visually-hidden">Toggle table of contents sidebar</div> + <i class="icon"><svg><use href="#svg-toc"></use></svg></i> + </label> + </div> + <article role="main"> + <section id="module-botcore.site_api"> +<span id="site-api"></span><h1>site_api<a class="headerlink" href="#module-botcore.site_api" title="Permalink to this headline">#</a></h1> +<p>An API wrapper around the Site API.</p> +<dl class="py class"> +<dt class="sig sig-object py" id="botcore.site_api.APIClient"> +<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">APIClient</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">site_api_url</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">site_api_token</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">session_kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/site_api.py#L42-L154"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient" title="Permalink to this definition">#</a></dt> +<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> +<p>A wrapper for the Django Site API.</p> +<dl class="py method"> +<dt class="sig sig-object py" id="botcore.site_api.APIClient.__init__"> +<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">site_api_url</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">site_api_token</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">session_kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/site_api.py#L48-L71"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.__init__" title="Permalink to this definition">#</a></dt> +<dd><p>Initialize a new <a class="reference internal" href="#botcore.site_api.APIClient" title="botcore.site_api.APIClient"><code class="xref py py-obj docutils literal notranslate"><span class="pre">APIClient</span></code></a> instance.</p> +<dl class="field-list simple"> +<dt class="field-odd">Parameters</dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>site_api_url</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>) – The URL of the site API.</p></li> +<li><p><strong>site_api_token</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>) – The token to use for authentication.</p></li> +<li><p><strong>session_kwargs</strong> – Keyword arguments to pass to the <a class="reference external" href="https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.ClientSession" title="(in aiohttp v3.8)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">aiohttp.ClientSession</span></code></a> constructor.</p></li> +</ul> +</dd> +</dl> +</dd></dl> +<dl class="py method"> +<dt class="sig sig-object py" id="botcore.site_api.APIClient.close"> +<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">close</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/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/site_api.py#L75-L78"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.close" title="Permalink to this definition">#</a></dt> +<dd><p>Close the aiohttp session.</p> +<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> +<dl class="py method"> +<dt class="sig sig-object py" id="botcore.site_api.APIClient.delete"> +<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">delete</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">endpoint</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_for_status</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/site_api.py#L136-L154"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.delete" title="Permalink to this definition">#</a></dt> +<dd><p>Send a DELETE request to the site API and return the JSON response.</p> +<dl class="field-list simple"> +<dt class="field-odd">Parameters</dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>endpoint</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>) – The endpoint to send the request to.</p></li> +<li><p><strong>raise_for_status</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – Whether or not to raise an exception if the response is not OK.</p></li> +<li><p><strong>**kwargs</strong> – Any extra keyword arguments to pass to <a class="reference external" href="https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.request" title="(in aiohttp v3.8)"><code class="xref py py-func docutils literal notranslate"><span class="pre">aiohttp.request()</span></code></a>.</p></li> +</ul> +</dd> +<dt class="field-even">Return type</dt> +<dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Optional" title="(in Python v3.10)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a>]</p> +</dd> +<dt class="field-odd">Returns</dt> +<dd class="field-odd"><p>The JSON response the API returns, or None if the response is 204 No Content.</p> +</dd> +</dl> +</dd></dl> +<dl class="py method"> +<dt class="sig sig-object py" id="botcore.site_api.APIClient.get"> +<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">endpoint</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_for_status</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/site_api.py#L120-L123"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.get" title="Permalink to this definition">#</a></dt> +<dd><p>Equivalent to <a class="reference internal" href="#botcore.site_api.APIClient.request" title="botcore.site_api.APIClient.request"><code class="xref py py-meth docutils literal notranslate"><span class="pre">APIClient.request()</span></code></a> with GET passed as the method.</p> +<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/stdtypes.html#dict" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a></p> +</dd> +</dl> +</dd></dl> +<dl class="py method"> +<dt class="sig sig-object py" id="botcore.site_api.APIClient.maybe_raise_for_status"> +<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">maybe_raise_for_status</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">response</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">should_raise</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/site_api.py#L79-L98"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.maybe_raise_for_status" title="Permalink to this definition">#</a></dt> +<dd><p>Raise <a class="reference internal" href="#botcore.site_api.ResponseCodeError" title="botcore.site_api.ResponseCodeError"><code class="xref py py-exc docutils literal notranslate"><span class="pre">ResponseCodeError</span></code></a> for non-OK response if an exception should be raised.</p> +<dl class="field-list simple"> +<dt class="field-odd">Parameters</dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>response</strong> (<a class="reference external" href="https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.ClientResponse" title="(in aiohttp v3.8)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">aiohttp.ClientResponse</span></code></a>) – The response to check.</p></li> +<li><p><strong>should_raise</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – Whether or not to raise an exception.</p></li> +</ul> +</dd> +<dt class="field-even">Raises</dt> +<dd class="field-even"><p><a class="reference internal" href="#botcore.site_api.ResponseCodeError" title="botcore.site_api.ResponseCodeError"><strong>ResponseCodeError</strong></a> – If the response is not OK and <code class="docutils literal notranslate"><span class="pre">should_raise</span></code> is True.</p> +</dd> +<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> +<dl class="py method"> +<dt class="sig sig-object py" id="botcore.site_api.APIClient.patch"> +<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">patch</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">endpoint</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_for_status</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/site_api.py#L124-L127"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.patch" title="Permalink to this definition">#</a></dt> +<dd><p>Equivalent to <a class="reference internal" href="#botcore.site_api.APIClient.request" title="botcore.site_api.APIClient.request"><code class="xref py py-meth docutils literal notranslate"><span class="pre">APIClient.request()</span></code></a> with PATCH passed as the method.</p> +<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/stdtypes.html#dict" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a></p> +</dd> +</dl> +</dd></dl> +<dl class="py method"> +<dt class="sig sig-object py" id="botcore.site_api.APIClient.post"> +<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">post</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">endpoint</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_for_status</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/site_api.py#L128-L131"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.post" title="Permalink to this definition">#</a></dt> +<dd><p>Equivalent to <a class="reference internal" href="#botcore.site_api.APIClient.request" title="botcore.site_api.APIClient.request"><code class="xref py py-meth docutils literal notranslate"><span class="pre">APIClient.request()</span></code></a> with POST passed as the method.</p> +<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/stdtypes.html#dict" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a></p> +</dd> +</dl> +</dd></dl> +<dl class="py method"> +<dt class="sig sig-object py" id="botcore.site_api.APIClient.put"> +<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">put</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">endpoint</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_for_status</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/site_api.py#L132-L135"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.put" title="Permalink to this definition">#</a></dt> +<dd><p>Equivalent to <a class="reference internal" href="#botcore.site_api.APIClient.request" title="botcore.site_api.APIClient.request"><code class="xref py py-meth docutils literal notranslate"><span class="pre">APIClient.request()</span></code></a> with PUT passed as the method.</p> +<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/stdtypes.html#dict" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a></p> +</dd> +</dl> +</dd></dl> +<dl class="py method"> +<dt class="sig sig-object py" id="botcore.site_api.APIClient.request"> +<em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">method</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">endpoint</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_for_status</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/site_api.py#L99-L119"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.request" title="Permalink to this definition">#</a></dt> +<dd><p>Send an HTTP request to the site API and return the JSON response.</p> +<dl class="field-list simple"> +<dt class="field-odd">Parameters</dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>method</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>) – The HTTP method to use.</p></li> +<li><p><strong>endpoint</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>) – The endpoint to send the request to.</p></li> +<li><p><strong>raise_for_status</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – Whether or not to raise an exception if the response is not OK.</p></li> +<li><p><strong>**kwargs</strong> – Any extra keyword arguments to pass to <a class="reference external" href="https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.request" title="(in aiohttp v3.8)"><code class="xref py py-func docutils literal notranslate"><span class="pre">aiohttp.request()</span></code></a>.</p></li> +</ul> +</dd> +<dt class="field-even">Return type</dt> +<dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a></p> +</dd> +<dt class="field-odd">Returns</dt> +<dd class="field-odd"><p>The JSON response the API returns.</p> +</dd> +<dt class="field-even">Raises</dt> +<dd class="field-even"><p><a class="reference internal" href="#botcore.site_api.ResponseCodeError" title="botcore.site_api.ResponseCodeError"><strong>ResponseCodeError</strong></a> – If the response is not OK and <code class="docutils literal notranslate"><span class="pre">raise_for_status</span></code> is True.</p> +</dd> +</dl> +</dd></dl> +</dd></dl> +<dl class="py exception"> +<dt class="sig sig-object py" id="botcore.site_api.ResponseCodeError"> +<em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">ResponseCodeError</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">response</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">response_json</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">response_text</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/site_api.py#L14-L40"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.ResponseCodeError" title="Permalink to this definition">#</a></dt> +<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#ValueError" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ValueError</span></code></a></p> +<p>Raised in <a class="reference internal" href="#botcore.site_api.APIClient.request" title="botcore.site_api.APIClient.request"><code class="xref py py-meth docutils literal notranslate"><span class="pre">APIClient.request()</span></code></a> when a non-OK HTTP response is received.</p> +<dl class="py method"> +<dt class="sig sig-object py" id="botcore.site_api.ResponseCodeError.__init__"> +<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">response</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">response_json</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">response_text</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/site_api.py#L17-L35"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.ResponseCodeError.__init__" title="Permalink to this definition">#</a></dt> +<dd><p>Initialize a new <a class="reference internal" href="#botcore.site_api.ResponseCodeError" title="botcore.site_api.ResponseCodeError"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ResponseCodeError</span></code></a> instance.</p> +<dl class="field-list simple"> +<dt class="field-odd">Parameters</dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>response</strong> (<a class="reference external" href="https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.ClientResponse" title="(in aiohttp v3.8)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">aiohttp.ClientResponse</span></code></a>) – The response object from the request.</p></li> +<li><p><strong>response_json</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Optional" title="(in Python v3.10)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a>]) – The JSON response returned from the request, if any.</p></li> +<li><p><strong>request_text</strong> – The text of the request, if any.</p></li> +</ul> +</dd> +</dl> +</dd></dl> +<dl class="py method"> +<dt class="sig sig-object py" id="botcore.site_api.ResponseCodeError.__str__"> +<span class="sig-name descname"><span class="pre">__str__</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/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/site_api.py#L36-L40"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.ResponseCodeError.__str__" title="Permalink to this definition">#</a></dt> +<dd><p>Return a string representation of the error.</p> +</dd></dl> +</dd></dl> +</section> + + </article> + </div> + <footer> + + <div class="related-pages"> + + <a class="prev-page" href="botcore.utils.scheduling.html"> + <svg><use href="#svg-arrow-right"></use></svg> + <div class="page-info"> + <div class="context"> + <span>Previous</span> + </div> + + <div class="title">scheduling</div> + + </div> + </a> + </div> + <div class="bottom-of-page"> + <div class="left-details"> + <div class="copyright"> + Copyright © 2021, Python Discord + </div> + Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s + + <a href="https://github.com/pradyunsg/furo">Furo</a> + + </div> + <div class="right-details"> + <div class="icons"> + + </div> + </div> + </div> + + </footer> + </div> + <aside class="toc-drawer no-toc"> + + + + </aside> + </div> +</div><script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script> + <script src="../_static/jquery.js"></script> + <script src="../_static/underscore.js"></script> + <script src="../_static/doctools.js"></script> + <script src="../_static/scripts/furo.js"></script> + </body> +</html>
\ No newline at end of file diff --git a/output/botcore.utils.caching.html b/output/botcore.utils.caching.html index 5354328e..8e24036f 100644 --- a/output/botcore.utils.caching.html +++ b/output/botcore.utils.caching.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="channel" href="botcore.utils.channel.html" /><link rel="prev" title="Utils" href="botcore.utils.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>caching - Bot Core v2.0.0</title> + <title>caching - Bot Core v2.1.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.0.0</div></a> + <a href="../index.html"><div class="brand">Bot Core v2.1.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.0.0</span> + <span class="sidebar-brand-text">Bot Core v2.1.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"> @@ -171,6 +171,7 @@ <li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> </ul> </li> +<li class="toctree-l2"><a class="reference internal" href="botcore.site_api.html">site_api</a></li> </ul> </li> </ul> @@ -214,14 +215,14 @@ <p>Utilities related to custom caches.</p> <dl class="py class"> <dt class="sig sig-object py" id="botcore.utils.caching.AsyncCache"> -<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">AsyncCache</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">max_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">128</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/caching.py#L8-L66"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.caching.AsyncCache" title="Permalink to this definition">#</a></dt> +<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">AsyncCache</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">max_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">128</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/caching.py#L8-L66"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.caching.AsyncCache" title="Permalink to this definition">#</a></dt> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <p>LRU cache implementation for coroutines.</p> <p>Once the cache exceeds the maximum size, keys are deleted in FIFO order.</p> <p>An offset may be optionally provided to be applied to the coroutine’s arguments when creating the cache key.</p> <dl class="py method"> <dt class="sig sig-object py" id="botcore.utils.caching.AsyncCache.__call__"> -<span class="sig-name descname"><span class="pre">__call__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">arg_offset</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/caching.py#L27-L62"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.caching.AsyncCache.__call__" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">__call__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">arg_offset</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/caching.py#L27-L62"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.caching.AsyncCache.__call__" title="Permalink to this definition">#</a></dt> <dd><p>Decorator for async cache.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> @@ -237,7 +238,7 @@ </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="botcore.utils.caching.AsyncCache.__init__"> -<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">max_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">128</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/caching.py#L17-L26"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.caching.AsyncCache.__init__" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">max_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">128</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/caching.py#L17-L26"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.caching.AsyncCache.__init__" title="Permalink to this definition">#</a></dt> <dd><p>Initialise a new <a class="reference internal" href="#botcore.utils.caching.AsyncCache" title="botcore.utils.caching.AsyncCache"><code class="xref py py-obj docutils literal notranslate"><span class="pre">AsyncCache</span></code></a> instance.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> @@ -247,7 +248,7 @@ </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="botcore.utils.caching.AsyncCache.clear"> -<span class="sig-name descname"><span class="pre">clear</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/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/caching.py#L63-L66"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.caching.AsyncCache.clear" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">clear</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/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/caching.py#L63-L66"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.caching.AsyncCache.clear" title="Permalink to this definition">#</a></dt> <dd><p>Clear cache instance.</p> <dl class="field-list simple"> <dt class="field-odd">Return type</dt> diff --git a/output/botcore.utils.channel.html b/output/botcore.utils.channel.html index 8ccc6430..aed83397 100644 --- a/output/botcore.utils.channel.html +++ b/output/botcore.utils.channel.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="extensions" href="botcore.utils.extensions.html" /><link rel="prev" title="caching" href="botcore.utils.caching.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>channel - Bot Core v2.0.0</title> + <title>channel - Bot Core v2.1.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.0.0</div></a> + <a href="../index.html"><div class="brand">Bot Core v2.1.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.0.0</span> + <span class="sidebar-brand-text">Bot Core v2.1.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"> @@ -171,6 +171,7 @@ <li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> </ul> </li> +<li class="toctree-l2"><a class="reference internal" href="botcore.site_api.html">site_api</a></li> </ul> </li> </ul> @@ -214,7 +215,7 @@ <p>Useful helper functions for interacting with various disnake channel objects.</p> <dl class="py function"> <dt class="sig sig-object py" id="botcore.utils.channel.get_or_fetch_channel"> -<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_or_fetch_channel</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bot</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">channel_id</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/channel.py#L25-L55"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.channel.get_or_fetch_channel" title="Permalink to this definition">#</a></dt> +<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_or_fetch_channel</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bot</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">channel_id</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/channel.py#L25-L55"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.channel.get_or_fetch_channel" title="Permalink to this definition">#</a></dt> <dd><p>Attempt to get or fetch the given <code class="docutils literal notranslate"><span class="pre">channel_id</span></code> from the bots cache, and return it.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> @@ -241,7 +242,7 @@ </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="botcore.utils.channel.is_in_category"> -<span class="sig-name descname"><span class="pre">is_in_category</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">channel</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">category_id</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/channel.py#L11-L23"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.channel.is_in_category" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">is_in_category</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">channel</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">category_id</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/channel.py#L11-L23"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.channel.is_in_category" title="Permalink to this definition">#</a></dt> <dd><p>Return whether the given <code class="docutils literal notranslate"><span class="pre">channel</span></code> in the the category with the id <code class="docutils literal notranslate"><span class="pre">category_id</span></code>.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> diff --git a/output/botcore.utils.extensions.html b/output/botcore.utils.extensions.html index d714a2d3..288f8a6f 100644 --- a/output/botcore.utils.extensions.html +++ b/output/botcore.utils.extensions.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="logging" href="botcore.utils.logging.html" /><link rel="prev" title="channel" href="botcore.utils.channel.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>extensions - Bot Core v2.0.0</title> + <title>extensions - Bot Core v2.1.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.0.0</div></a> + <a href="../index.html"><div class="brand">Bot Core v2.1.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.0.0</span> + <span class="sidebar-brand-text">Bot Core v2.1.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"> @@ -171,6 +171,7 @@ <li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> </ul> </li> +<li class="toctree-l2"><a class="reference internal" href="botcore.site_api.html">site_api</a></li> </ul> </li> </ul> @@ -214,7 +215,7 @@ <p>Utilities for loading Discord extensions.</p> <dl class="py function"> <dt class="sig sig-object py" id="botcore.utils.extensions.unqualify"> -<span class="sig-name descname"><span class="pre">unqualify</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/extensions.py#L10-L21"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.extensions.unqualify" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">unqualify</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/extensions.py#L10-L21"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.extensions.unqualify" title="Permalink to this definition">#</a></dt> <dd><p>Return an unqualified name given a qualified module/package <code class="docutils literal notranslate"><span class="pre">name</span></code>.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> @@ -230,7 +231,7 @@ </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="botcore.utils.extensions.walk_extensions"> -<span class="sig-name descname"><span class="pre">walk_extensions</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">module</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/extensions.py#L23-L53"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.extensions.walk_extensions" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">walk_extensions</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">module</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/extensions.py#L23-L53"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.extensions.walk_extensions" title="Permalink to this definition">#</a></dt> <dd><p>Yield extension names from the given module.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> diff --git a/output/botcore.utils.html b/output/botcore.utils.html index cb9268a3..a49833e0 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.0.0</title> + <title>Utils - Bot Core v2.1.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.0.0</div></a> + <a href="../index.html"><div class="brand">Bot Core v2.1.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.0.0</span> + <span class="sidebar-brand-text">Bot Core v2.1.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"> @@ -171,6 +171,7 @@ <li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> </ul> </li> +<li class="toctree-l2"><a class="reference internal" href="botcore.site_api.html">site_api</a></li> </ul> </li> </ul> diff --git a/output/botcore.utils.logging.html b/output/botcore.utils.logging.html index bdb131e0..c3af4918 100644 --- a/output/botcore.utils.logging.html +++ b/output/botcore.utils.logging.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="members" href="botcore.utils.members.html" /><link rel="prev" title="extensions" href="botcore.utils.extensions.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>logging - Bot Core v2.0.0</title> + <title>logging - Bot Core v2.1.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.0.0</div></a> + <a href="../index.html"><div class="brand">Bot Core v2.1.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.0.0</span> + <span class="sidebar-brand-text">Bot Core v2.1.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"> @@ -171,6 +171,7 @@ <li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> </ul> </li> +<li class="toctree-l2"><a class="reference internal" href="botcore.site_api.html">site_api</a></li> </ul> </li> </ul> @@ -214,12 +215,12 @@ <p>Common logging related functions.</p> <dl class="py class"> <dt class="sig sig-object py" id="botcore.utils.logging.CustomLogger"> -<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">CustomLogger</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">level</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/logging.py#L14-L33"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.logging.CustomLogger" title="Permalink to this definition">#</a></dt> +<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">CustomLogger</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">level</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/logging.py#L14-L33"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.logging.CustomLogger" title="Permalink to this definition">#</a></dt> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/logging.html#logging.Logger" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">logging.Logger</span></code></a></p> <p>Custom implementation of the <a class="reference external" href="https://docs.python.org/3/library/logging.html#logging.Logger" title="(in Python v3.10)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">logging.Logger</span></code></a> class with an added <a class="reference internal" href="#botcore.utils.logging.CustomLogger.trace" title="botcore.utils.logging.CustomLogger.trace"><code class="xref py py-obj docutils literal notranslate"><span class="pre">trace</span></code></a> method.</p> <dl class="py method"> <dt class="sig sig-object py" id="botcore.utils.logging.CustomLogger.trace"> -<span class="sig-name descname"><span class="pre">trace</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">msg</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/logging.py#L17-L33"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.logging.CustomLogger.trace" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">trace</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">msg</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/logging.py#L17-L33"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.logging.CustomLogger.trace" title="Permalink to this definition">#</a></dt> <dd><p>Log the given message with the severity <code class="docutils literal notranslate"><span class="pre">"TRACE"</span></code>.</p> <p>To pass exception information, use the keyword argument exc_info with a true value:</p> <div class="highlight-py notranslate"><div class="highlight"><pre><span></span><span class="n">logger</span><span class="o">.</span><span class="n">trace</span><span class="p">(</span><span class="s2">"Houston, we have an </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="s2">"interesting problem"</span><span class="p">,</span> <span class="n">exc_info</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span> @@ -241,7 +242,7 @@ </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="botcore.utils.logging.get_logger"> -<span class="sig-name descname"><span class="pre">get_logger</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/logging.py#L35-L46"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.logging.get_logger" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">get_logger</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/logging.py#L35-L46"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.logging.get_logger" title="Permalink to this definition">#</a></dt> <dd><p>Utility to make mypy recognise that logger is of type <a class="reference internal" href="#botcore.utils.logging.CustomLogger" title="botcore.utils.logging.CustomLogger"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CustomLogger</span></code></a>.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> diff --git a/output/botcore.utils.members.html b/output/botcore.utils.members.html index ab750866..7aa36a96 100644 --- a/output/botcore.utils.members.html +++ b/output/botcore.utils.members.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="monkey_patches" href="botcore.utils.monkey_patches.html" /><link rel="prev" title="logging" href="botcore.utils.logging.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>members - Bot Core v2.0.0</title> + <title>members - Bot Core v2.1.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.0.0</div></a> + <a href="../index.html"><div class="brand">Bot Core v2.1.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.0.0</span> + <span class="sidebar-brand-text">Bot Core v2.1.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"> @@ -171,6 +171,7 @@ <li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> </ul> </li> +<li class="toctree-l2"><a class="reference internal" href="botcore.site_api.html">site_api</a></li> </ul> </li> </ul> @@ -214,7 +215,7 @@ <p>Useful helper functions for interactin with <a class="reference external" href="https://docs.disnake.dev/en/latest/api.html#disnake.Member" title="(in disnake v2.5.0a)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">disnake.Member</span></code></a> objects.</p> <dl class="py function"> <dt class="sig sig-object py" id="botcore.utils.members.get_or_fetch_member"> -<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_or_fetch_member</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">guild</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">member_id</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/members.py#L12-L29"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.members.get_or_fetch_member" title="Permalink to this definition">#</a></dt> +<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_or_fetch_member</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">guild</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">member_id</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/members.py#L12-L29"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.members.get_or_fetch_member" title="Permalink to this definition">#</a></dt> <dd><p>Attempt to get a member from cache; on failure fetch from the API.</p> <dl class="field-list simple"> <dt class="field-odd">Return type</dt> @@ -227,7 +228,7 @@ </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="botcore.utils.members.handle_role_change"> -<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">handle_role_change</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">member</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coro</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">role</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/members.py#L31-L57"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.members.handle_role_change" title="Permalink to this definition">#</a></dt> +<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">handle_role_change</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">member</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coro</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">role</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/members.py#L31-L57"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.members.handle_role_change" title="Permalink to this definition">#</a></dt> <dd><p>Await the given <code class="docutils literal notranslate"><span class="pre">coro</span></code> with <code class="docutils literal notranslate"><span class="pre">member</span></code> as the sole argument.</p> <p>Handle errors that we expect to be raised from <a class="reference external" href="https://docs.disnake.dev/en/latest/api.html#disnake.Member.add_roles" title="(in disnake v2.5.0a)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">disnake.Member.add_roles</span></code></a> and <a class="reference external" href="https://docs.disnake.dev/en/latest/api.html#disnake.Member.remove_roles" title="(in disnake v2.5.0a)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">disnake.Member.remove_roles</span></code></a>.</p> diff --git a/output/botcore.utils.monkey_patches.html b/output/botcore.utils.monkey_patches.html index e9ebbff1..f1eaacec 100644 --- a/output/botcore.utils.monkey_patches.html +++ b/output/botcore.utils.monkey_patches.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="regex" href="botcore.utils.regex.html" /><link rel="prev" title="members" href="botcore.utils.members.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>monkey_patches - Bot Core v2.0.0</title> + <title>monkey_patches - Bot Core v2.1.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.0.0</div></a> + <a href="../index.html"><div class="brand">Bot Core v2.1.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.0.0</span> + <span class="sidebar-brand-text">Bot Core v2.1.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"> @@ -171,6 +171,7 @@ <li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> </ul> </li> +<li class="toctree-l2"><a class="reference internal" href="botcore.site_api.html">site_api</a></li> </ul> </li> </ul> @@ -214,7 +215,7 @@ <p>Contains all common monkey patches, used to alter disnake to fit our needs.</p> <dl class="py function"> <dt class="sig sig-object py" id="botcore.utils.monkey_patches.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/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/monkey_patches.py#L65-L84"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.monkey_patches.apply_monkey_patches" title="Permalink to this definition">#</a></dt> +<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/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/monkey_patches.py#L65-L84"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.monkey_patches.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 diff --git a/output/botcore.utils.regex.html b/output/botcore.utils.regex.html index 9dcf3de2..ee14d708 100644 --- a/output/botcore.utils.regex.html +++ b/output/botcore.utils.regex.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="scheduling" href="botcore.utils.scheduling.html" /><link rel="prev" title="monkey_patches" href="botcore.utils.monkey_patches.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>regex - Bot Core v2.0.0</title> + <title>regex - Bot Core v2.1.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.0.0</div></a> + <a href="../index.html"><div class="brand">Bot Core v2.1.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.0.0</span> + <span class="sidebar-brand-text">Bot Core v2.1.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"> @@ -171,6 +171,7 @@ <li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> </ul> </li> +<li class="toctree-l2"><a class="reference internal" href="botcore.site_api.html">site_api</a></li> </ul> </li> </ul> @@ -214,21 +215,21 @@ <p>Common regular expressions.</p> <dl class="py data"> <dt class="sig sig-object py" id="botcore.utils.regex.DISCORD_INVITE"> -<span class="sig-name descname"><span class="pre">DISCORD_INVITE</span></span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/regex.py#L5-L16"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.regex.DISCORD_INVITE" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">DISCORD_INVITE</span></span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/regex.py#L5-L16"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.regex.DISCORD_INVITE" title="Permalink to this definition">#</a></dt> <dd><p>Regex for Discord server invites.</p> <dl class="field-list simple"> </dl> </dd></dl> <dl class="py data"> <dt class="sig sig-object py" id="botcore.utils.regex.FORMATTED_CODE_REGEX"> -<span class="sig-name descname"><span class="pre">FORMATTED_CODE_REGEX</span></span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/regex.py#L23-L31"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.regex.FORMATTED_CODE_REGEX" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">FORMATTED_CODE_REGEX</span></span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/regex.py#L23-L31"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.regex.FORMATTED_CODE_REGEX" title="Permalink to this definition">#</a></dt> <dd><p>Regex for formatted code, using Discord’s code blocks.</p> <dl class="field-list simple"> </dl> </dd></dl> <dl class="py data"> <dt class="sig sig-object py" id="botcore.utils.regex.RAW_CODE_REGEX"> -<span class="sig-name descname"><span class="pre">RAW_CODE_REGEX</span></span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/regex.py#L38-L43"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.regex.RAW_CODE_REGEX" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">RAW_CODE_REGEX</span></span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/regex.py#L38-L43"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.regex.RAW_CODE_REGEX" title="Permalink to this definition">#</a></dt> <dd><p>Regex for raw code, <em>not</em> using Discord’s code blocks.</p> <dl class="field-list simple"> </dl> diff --git a/output/botcore.utils.scheduling.html b/output/botcore.utils.scheduling.html index d8216a0a..1459a069 100644 --- a/output/botcore.utils.scheduling.html +++ b/output/botcore.utils.scheduling.html @@ -3,10 +3,10 @@ <head><meta charset="utf-8"/> <meta name="viewport" content="width=device-width,initial-scale=1"/> <meta name="color-scheme" content="light dark"><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" /> -<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="prev" title="regex" href="botcore.utils.regex.html" /> +<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="site_api" href="botcore.site_api.html" /><link rel="prev" title="regex" href="botcore.utils.regex.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>scheduling - Bot Core v2.0.0</title> + <title>scheduling - Bot Core v2.1.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.0.0</div></a> + <a href="../index.html"><div class="brand">Bot Core v2.1.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.0.0</span> + <span class="sidebar-brand-text">Bot Core v2.1.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"> @@ -171,6 +171,7 @@ <li class="toctree-l3 current current-page"><a class="current reference internal" href="#">scheduling</a></li> </ul> </li> +<li class="toctree-l2"><a class="reference internal" href="botcore.site_api.html">site_api</a></li> </ul> </li> </ul> @@ -214,7 +215,7 @@ <p>Generic python scheduler.</p> <dl class="py class"> <dt class="sig sig-object py" id="botcore.utils.scheduling.Scheduler"> -<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">Scheduler</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/scheduling.py#L13-L209"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.Scheduler" title="Permalink to this definition">#</a></dt> +<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">Scheduler</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/scheduling.py#L13-L209"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.Scheduler" title="Permalink to this definition">#</a></dt> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <p>Schedule the execution of coroutines and keep track of them.</p> <p>When instantiating a <a class="reference internal" href="#botcore.utils.scheduling.Scheduler" title="botcore.utils.scheduling.Scheduler"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Scheduler</span></code></a>, a name must be provided. This name is used to distinguish the @@ -228,7 +229,7 @@ the same ID used to schedule it.</p> <p>Any exception raised in a scheduled task is logged when the task is done.</p> <dl class="py method"> <dt class="sig sig-object py" id="botcore.utils.scheduling.Scheduler.__contains__"> -<span class="sig-name descname"><span class="pre">__contains__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">task_id</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/scheduling.py#L43-L54"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.Scheduler.__contains__" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">__contains__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">task_id</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/scheduling.py#L43-L54"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.Scheduler.__contains__" title="Permalink to this definition">#</a></dt> <dd><p>Return <a class="reference external" href="https://docs.python.org/3/library/constants.html#True" title="(in Python v3.10)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">True</span></code></a> if a task with the given <code class="docutils literal notranslate"><span class="pre">task_id</span></code> is currently scheduled.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> @@ -244,7 +245,7 @@ the same ID used to schedule it.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="botcore.utils.scheduling.Scheduler.__init__"> -<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/scheduling.py#L31-L42"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.Scheduler.__init__" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/scheduling.py#L31-L42"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.Scheduler.__init__" title="Permalink to this definition">#</a></dt> <dd><p>Initialize a new <a class="reference internal" href="#botcore.utils.scheduling.Scheduler" title="botcore.utils.scheduling.Scheduler"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Scheduler</span></code></a> instance.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> @@ -254,7 +255,7 @@ the same ID used to schedule it.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="botcore.utils.scheduling.Scheduler.cancel"> -<span class="sig-name descname"><span class="pre">cancel</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">task_id</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/scheduling.py#L125-L142"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.Scheduler.cancel" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">cancel</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">task_id</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/scheduling.py#L125-L142"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.Scheduler.cancel" title="Permalink to this definition">#</a></dt> <dd><p>Unschedule the task identified by <code class="docutils literal notranslate"><span class="pre">task_id</span></code>. Log a warning if the task doesn’t exist.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> @@ -267,7 +268,7 @@ the same ID used to schedule it.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="botcore.utils.scheduling.Scheduler.cancel_all"> -<span class="sig-name descname"><span class="pre">cancel_all</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/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/scheduling.py#L143-L149"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.Scheduler.cancel_all" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">cancel_all</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/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/scheduling.py#L143-L149"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.Scheduler.cancel_all" title="Permalink to this definition">#</a></dt> <dd><p>Unschedule all known tasks.</p> <dl class="field-list simple"> <dt class="field-odd">Return type</dt> @@ -277,7 +278,7 @@ the same ID used to schedule it.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="botcore.utils.scheduling.Scheduler.schedule"> -<span class="sig-name descname"><span class="pre">schedule</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">task_id</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coroutine</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/scheduling.py#L55-L81"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.Scheduler.schedule" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">schedule</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">task_id</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coroutine</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/scheduling.py#L55-L81"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.Scheduler.schedule" title="Permalink to this definition">#</a></dt> <dd><p>Schedule the execution of a <code class="docutils literal notranslate"><span class="pre">coroutine</span></code>.</p> <p>If a task with <code class="docutils literal notranslate"><span class="pre">task_id</span></code> already exists, close <code class="docutils literal notranslate"><span class="pre">coroutine</span></code> instead of scheduling it. This prevents unawaited coroutine warnings. Don’t pass a coroutine that’ll be re-used elsewhere.</p> @@ -295,7 +296,7 @@ prevents unawaited coroutine warnings. Don’t pass a coroutine that’ll be re- </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="botcore.utils.scheduling.Scheduler.schedule_at"> -<span class="sig-name descname"><span class="pre">schedule_at</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">time</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">task_id</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coroutine</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/scheduling.py#L82-L105"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.Scheduler.schedule_at" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">schedule_at</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">time</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">task_id</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coroutine</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/scheduling.py#L82-L105"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.Scheduler.schedule_at" title="Permalink to this definition">#</a></dt> <dd><p>Schedule <code class="docutils literal notranslate"><span class="pre">coroutine</span></code> to be executed at the given <code class="docutils literal notranslate"><span class="pre">time</span></code>.</p> <p>If <code class="docutils literal notranslate"><span class="pre">time</span></code> is timezone aware, then use that timezone to calculate now() when subtracting. If <code class="docutils literal notranslate"><span class="pre">time</span></code> is naïve, then use UTC.</p> @@ -317,7 +318,7 @@ prevents unawaited coroutine warnings. Don’t pass a coroutine that’ll be re- </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="botcore.utils.scheduling.Scheduler.schedule_later"> -<span class="sig-name descname"><span class="pre">schedule_later</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">delay</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">task_id</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coroutine</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/scheduling.py#L106-L124"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.Scheduler.schedule_later" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">schedule_later</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">delay</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">task_id</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coroutine</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/scheduling.py#L106-L124"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.Scheduler.schedule_later" title="Permalink to this definition">#</a></dt> <dd><p>Schedule <code class="docutils literal notranslate"><span class="pre">coroutine</span></code> to be executed after <code class="docutils literal notranslate"><span class="pre">delay</span></code> seconds.</p> <p>If a task with <code class="docutils literal notranslate"><span class="pre">task_id</span></code> already exists, close <code class="docutils literal notranslate"><span class="pre">coroutine</span></code> instead of scheduling it. This prevents unawaited coroutine warnings. Don’t pass a coroutine that’ll be re-used elsewhere.</p> @@ -337,7 +338,7 @@ prevents unawaited coroutine warnings. Don’t pass a coroutine that’ll be re- </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="botcore.utils.scheduling.create_task"> -<span class="sig-name descname"><span class="pre">create_task</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">coro</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">suppressed_exceptions</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">()</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">event_loop</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/5593a0c95e2b4fd9515c8875ea6e51c0ab88eb00/botcore/utils/scheduling.py#L211-L239"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.create_task" title="Permalink to this definition">#</a></dt> +<span class="sig-name descname"><span class="pre">create_task</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">coro</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">suppressed_exceptions</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">()</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">event_loop</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/114db8556dd236fd5ba58061357e7ae1e5e732b2/botcore/utils/scheduling.py#L211-L239"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.scheduling.create_task" title="Permalink to this definition">#</a></dt> <dd><p>Wrapper for creating an <a class="reference external" href="https://docs.python.org/3/library/asyncio-task.html#asyncio.Task" title="(in Python v3.10)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">asyncio.Task</span></code></a> which logs exceptions raised in the task.</p> <p>If the <code class="docutils literal notranslate"><span class="pre">event_loop</span></code> kwarg is provided, the task is created from that event loop, otherwise the running loop is used.</p> @@ -365,7 +366,15 @@ otherwise the running loop is used.</p> <footer> <div class="related-pages"> - + <a class="next-page" href="botcore.site_api.html"> + <div class="page-info"> + <div class="context"> + <span>Next</span> + </div> + <div class="title">site_api</div> + </div> + <svg><use href="#svg-arrow-right"></use></svg> + </a> <a class="prev-page" href="botcore.utils.regex.html"> <svg><use href="#svg-arrow-right"></use></svg> <div class="page-info"> diff --git a/py-modindex.html b/py-modindex.html index 4c31003d..1926f88a 100644 --- a/py-modindex.html +++ b/py-modindex.html @@ -4,7 +4,7 @@ <meta name="viewport" content="width=device-width,initial-scale=1"/> <meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.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>Python Module Index - Bot Core v2.0.0</title> + <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>Python Module Index - Bot Core v2.1.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" /> @@ -120,7 +120,7 @@ </label> </div> <div class="header-center"> - <a href="index.html"><div class="brand">Bot Core v2.0.0</div></a> + <a href="index.html"><div class="brand">Bot Core v2.1.0</div></a> </div> <div class="header-right"> <div class="theme-toggle-container theme-toggle-header"> @@ -146,7 +146,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.0.0</span> + <span class="sidebar-brand-text">Bot Core v2.1.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"> @@ -169,6 +169,7 @@ <li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.scheduling.html">scheduling</a></li> </ul> </li> +<li class="toctree-l2"><a class="reference internal" href="output/botcore.site_api.html">site_api</a></li> </ul> </li> </ul> @@ -235,6 +236,12 @@ <tr class="cg-1"> <td></td> <td>    + <a href="output/botcore.site_api.html#module-botcore.site_api"><code class="xref">botcore.site_api</code></a></td><td> + <em></em></td> + </tr> + <tr class="cg-1"> + <td></td> + <td>    <a href="output/botcore.utils.html#module-botcore.utils"><code class="xref">botcore.utils</code></a></td><td> <em></em></td> </tr> diff --git a/search.html b/search.html index a92f093a..113ac66a 100644 --- a/search.html +++ b/search.html @@ -4,7 +4,7 @@ <meta name="viewport" content="width=device-width,initial-scale=1"/> <meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="#" /> - <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>Search - Bot Core v2.0.0</title><link rel="stylesheet" type="text/css" href="_static/pygments.css" /> + <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>Search - Bot Core v2.1.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" /> <link rel="stylesheet" type="text/css" href="_static/index.css" /> @@ -119,7 +119,7 @@ </label> </div> <div class="header-center"> - <a href="index.html"><div class="brand">Bot Core v2.0.0</div></a> + <a href="index.html"><div class="brand">Bot Core v2.1.0</div></a> </div> <div class="header-right"> <div class="theme-toggle-container theme-toggle-header"> @@ -145,7 +145,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.0.0</span> + <span class="sidebar-brand-text">Bot Core v2.1.0</span> </a><form class="sidebar-search-container" method="get" action="#" role="search"> <input class="sidebar-search" placeholder=Search name="q" aria-label="Search"> @@ -168,6 +168,7 @@ <li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.scheduling.html">scheduling</a></li> </ul> </li> +<li class="toctree-l2"><a class="reference internal" href="output/botcore.site_api.html">site_api</a></li> </ul> </li> </ul> diff --git a/searchindex.js b/searchindex.js index 40988f90..5b227bf7 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["index","output/botcore","output/botcore.exts","output/botcore.utils","output/botcore.utils.caching","output/botcore.utils.channel","output/botcore.utils.extensions","output/botcore.utils.logging","output/botcore.utils.members","output/botcore.utils.monkey_patches","output/botcore.utils.regex","output/botcore.utils.scheduling"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,"sphinx.ext.todo":2,sphinx:56},filenames:["index.rst","output/botcore.rst","output/botcore.exts.rst","output/botcore.utils.rst","output/botcore.utils.caching.rst","output/botcore.utils.channel.rst","output/botcore.utils.extensions.rst","output/botcore.utils.logging.rst","output/botcore.utils.members.rst","output/botcore.utils.monkey_patches.rst","output/botcore.utils.regex.rst","output/botcore.utils.scheduling.rst"],objects:{"":[[1,0,0,"-","botcore"]],"botcore.utils":[[4,0,0,"-","caching"],[5,0,0,"-","channel"],[6,0,0,"-","extensions"],[7,0,0,"-","logging"],[8,0,0,"-","members"],[9,0,0,"-","monkey_patches"],[10,0,0,"-","regex"],[11,0,0,"-","scheduling"]],"botcore.utils.caching":[[4,1,1,"","AsyncCache"]],"botcore.utils.caching.AsyncCache":[[4,2,1,"","__call__"],[4,2,1,"","__init__"],[4,2,1,"","clear"]],"botcore.utils.channel":[[5,3,1,"","get_or_fetch_channel"],[5,3,1,"","is_in_category"]],"botcore.utils.extensions":[[6,3,1,"","unqualify"],[6,3,1,"","walk_extensions"]],"botcore.utils.logging":[[7,1,1,"","CustomLogger"],[7,3,1,"","get_logger"]],"botcore.utils.logging.CustomLogger":[[7,2,1,"","trace"]],"botcore.utils.members":[[8,3,1,"","get_or_fetch_member"],[8,3,1,"","handle_role_change"]],"botcore.utils.monkey_patches":[[9,3,1,"","apply_monkey_patches"]],"botcore.utils.regex":[[10,4,1,"","DISCORD_INVITE"],[10,4,1,"","FORMATTED_CODE_REGEX"],[10,4,1,"","RAW_CODE_REGEX"]],"botcore.utils.scheduling":[[11,1,1,"","Scheduler"],[11,3,1,"","create_task"]],"botcore.utils.scheduling.Scheduler":[[11,2,1,"","__contains__"],[11,2,1,"","__init__"],[11,2,1,"","cancel"],[11,2,1,"","cancel_all"],[11,2,1,"","schedule"],[11,2,1,"","schedule_at"],[11,2,1,"","schedule_later"]],botcore:[[2,0,0,"-","exts"],[3,0,0,"-","utils"]]},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","function","Python function"],"4":["py","data","Python data"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:function","4":"py:data"},terms:{"0":[4,7],"1":7,"128":4,"403":9,"class":[4,7,11],"do":5,"float":11,"function":[4,5,7,8,11],"int":[4,5,11],"long":11,"na\u00efv":11,"new":[4,11],"return":[4,5,6,7,8,9,11],"true":[7,11],A:[4,5,6,9,11],If:11,It:9,The:[4,5,6,7,8,11],To:7,__call__:4,__contains__:11,__init__:[4,11],abstracteventloop:11,act:9,ad:[7,9],add_rol:8,after:11,alia:9,alias:9,all:[9,11],alreadi:11,also:9,alter:9,an:[4,5,6,7,9,11],ani:11,api:8,appli:[4,9],apply_monkey_patch:9,ar:4,arg:7,arg_offset:4,argument:[4,7,8,9],async:[4,5,8],asynccach:4,asyncio:11,attempt:[5,8],attribut:9,await:[8,11],awar:11,base:[4,7,11],befor:11,being:9,block:10,bool:[5,11],bot:[1,3,5,6,9],botcor:0,cach:[1,3,5,8],calcul:11,call:11,callabl:[4,8],can:[6,11],cancel:11,cancel_al:11,categori:5,category_id:5,caus:9,changelog:0,channel:[1,3],channel_id:5,check:[5,11],clear:4,close:11,cloudflar:9,code:10,cog:2,command:[5,6,9],common:[7,9,10],contain:[9,11],coro:[8,11],coroutin:[4,8,11],could:8,creat:[4,11],create_task:11,current:11,custom:[4,7],customlogg:7,datetim:11,decor:4,delai:11,delet:4,depend:5,develop:[1,3],directli:6,discord:[1,2,3,5,6,9,10],discord_invit:10,disnak:[5,6,8,9],distinguish:11,doesn:11,don:11,done:11,elsewher:11,error:[8,9],event:11,event_loop:11,exc_info:7,exce:4,except:[7,11],execut:11,exist:11,expect:8,express:10,ext:[0,1,5,6,9],extens:[1,3],fail:5,failur:8,fetch:[5,8],fifo:4,fit:9,forbidden:5,format:10,formatted_code_regex:10,found:[8,11],from:[5,6,8,9,11],frozenset:6,futur:11,gener:11,get:[5,8],get_logg:7,get_or_fetch_channel:5,get_or_fetch_memb:8,given:[5,6,7,8,11],group:9,guild:8,guildchannel:5,ha:9,handl:[8,11],handle_role_chang:8,hashabl:11,have:[5,7],heavi:9,helper:[5,8],houston:7,how:[4,11],httpexcept:5,id:[5,11],identifi:11,ignor:9,immedi:11,implement:[4,7],index:0,indic:8,inform:[0,7],initi:11,initialis:4,instanc:[4,5,7,11],instanti:11,instead:11,intend:8,interact:5,interactin:8,interest:7,intern:9,invalid:5,invaliddata:5,invit:10,is_in_categori:5,item:4,keep:11,kei:4,keyword:[7,9],known:11,kwarg:[7,11],level:[7,9],ll:11,load:[6,9],load_extens:6,log:[1,3,11],logger:7,look:[6,11],loop:11,lru:4,mai:4,make:7,mani:4,max_siz:4,maximum:4,member:[1,3],member_id:8,messag:[7,11],method:[7,9],modul:[6,11],moduletyp:6,monkei:9,monkey_patch:[1,3],msg:7,must:11,mypi:7,name:[6,7,9,11],namespac:11,need:9,none:[4,7,8,9,11],notfound:5,now:11,object:[4,5,8,9,11],offset:4,onc:4,oper:11,option:[4,7,8],order:[4,11],other:11,otherwis:11,our:9,packag:6,page:0,paramet:[4,5,6,7,8,11],pass:[6,7,8,11],past:11,patch:9,permiss:5,posit:4,prematur:11,prevent:11,problem:7,provid:[4,11],python:11,qualifi:6,rais:[5,8,11],rather:9,raw:10,raw_code_regex:10,re:11,receiv:5,recognis:7,regex:[1,3],regular:10,relat:[4,7],remove_rol:8,requir:11,result:11,retriev:5,reusabl:2,role:8,root:9,root_alias:9,rout:9,run:11,s:[4,7,9,10,11],same:11,schedul:[1,3],schedule_at:11,schedule_lat:11,search:0,second:11,send_typ:9,sequenc:9,server:10,set:6,sever:7,size:4,so:9,sole:8,sourc:[4,5,6,7,8,9,10,11],start:11,store:[4,9],str:[6,7,11],string:6,submodul:[0,1],subpackag:0,subtract:11,suggest:11,support:[9,11],suppressed_except:11,t:11,target:4,task:11,task_id:11,textchannel:5,than:9,them:11,thi:[5,8,9,11],thrown:9,time:11,timezon:11,tool:[1,3],top:9,trace:7,track:11,tupl:11,two:9,type:[4,5,6,7,8,9,11],unawait:11,under:9,union:11,uniqu:11,unknown:5,unqualifi:6,unschedul:11,us:[1,3,5,7,8,9,10,11],utc:11,util:[0,1,4,6,7],valu:7,variou:5,wa:[5,11],wait:11,walk_extens:6,warn:11,we:[7,8],when:[4,9,11],whether:5,which:[9,11],worker:9,wrap:[4,11],wrapper:11,yield:6,you:5},titles:["Bot Core Project Documentation","Botcore","Exts","Utils","caching","channel","extensions","logging","members","monkey_patches","regex","scheduling"],titleterms:{bot:0,botcor:1,cach:4,channel:5,core:0,document:0,ext:2,extens:6,extra:0,log:7,member:8,modul:0,monkey_patch:9,other:0,project:0,refer:0,regex:10,schedul:11,submodul:3,subpackag:1,util:3}})
\ No newline at end of file +Search.setIndex({docnames:["index","output/botcore","output/botcore.exts","output/botcore.site_api","output/botcore.utils","output/botcore.utils.caching","output/botcore.utils.channel","output/botcore.utils.extensions","output/botcore.utils.logging","output/botcore.utils.members","output/botcore.utils.monkey_patches","output/botcore.utils.regex","output/botcore.utils.scheduling"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,"sphinx.ext.todo":2,sphinx:56},filenames:["index.rst","output/botcore.rst","output/botcore.exts.rst","output/botcore.site_api.rst","output/botcore.utils.rst","output/botcore.utils.caching.rst","output/botcore.utils.channel.rst","output/botcore.utils.extensions.rst","output/botcore.utils.logging.rst","output/botcore.utils.members.rst","output/botcore.utils.monkey_patches.rst","output/botcore.utils.regex.rst","output/botcore.utils.scheduling.rst"],objects:{"":[[1,0,0,"-","botcore"]],"botcore.site_api":[[3,1,1,"","APIClient"],[3,3,1,"","ResponseCodeError"]],"botcore.site_api.APIClient":[[3,2,1,"","__init__"],[3,2,1,"","close"],[3,2,1,"","delete"],[3,2,1,"","get"],[3,2,1,"","maybe_raise_for_status"],[3,2,1,"","patch"],[3,2,1,"","post"],[3,2,1,"","put"],[3,2,1,"","request"]],"botcore.site_api.ResponseCodeError":[[3,2,1,"","__init__"],[3,2,1,"","__str__"]],"botcore.utils":[[5,0,0,"-","caching"],[6,0,0,"-","channel"],[7,0,0,"-","extensions"],[8,0,0,"-","logging"],[9,0,0,"-","members"],[10,0,0,"-","monkey_patches"],[11,0,0,"-","regex"],[12,0,0,"-","scheduling"]],"botcore.utils.caching":[[5,1,1,"","AsyncCache"]],"botcore.utils.caching.AsyncCache":[[5,2,1,"","__call__"],[5,2,1,"","__init__"],[5,2,1,"","clear"]],"botcore.utils.channel":[[6,4,1,"","get_or_fetch_channel"],[6,4,1,"","is_in_category"]],"botcore.utils.extensions":[[7,4,1,"","unqualify"],[7,4,1,"","walk_extensions"]],"botcore.utils.logging":[[8,1,1,"","CustomLogger"],[8,4,1,"","get_logger"]],"botcore.utils.logging.CustomLogger":[[8,2,1,"","trace"]],"botcore.utils.members":[[9,4,1,"","get_or_fetch_member"],[9,4,1,"","handle_role_change"]],"botcore.utils.monkey_patches":[[10,4,1,"","apply_monkey_patches"]],"botcore.utils.regex":[[11,5,1,"","DISCORD_INVITE"],[11,5,1,"","FORMATTED_CODE_REGEX"],[11,5,1,"","RAW_CODE_REGEX"]],"botcore.utils.scheduling":[[12,1,1,"","Scheduler"],[12,4,1,"","create_task"]],"botcore.utils.scheduling.Scheduler":[[12,2,1,"","__contains__"],[12,2,1,"","__init__"],[12,2,1,"","cancel"],[12,2,1,"","cancel_all"],[12,2,1,"","schedule"],[12,2,1,"","schedule_at"],[12,2,1,"","schedule_later"]],botcore:[[2,0,0,"-","exts"],[3,0,0,"-","site_api"],[4,0,0,"-","utils"]]},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","exception","Python exception"],"4":["py","function","Python function"],"5":["py","data","Python data"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:exception","4":"py:function","5":"py:data"},terms:{"0":[5,8],"1":8,"128":5,"204":3,"403":10,"class":[3,5,8,12],"do":6,"float":12,"function":[5,6,8,9,12],"int":[5,6,12],"long":12,"na\u00efv":12,"new":[3,5,12],"return":[3,5,6,7,8,9,10,12],"true":[3,8,12],A:[3,5,6,7,10,12],If:[3,12],It:10,No:3,The:[3,5,6,7,8,9,12],To:8,__call__:5,__contains__:12,__init__:[3,5,12],__str__:3,abstracteventloop:12,act:10,ad:[8,10],add_rol:9,after:12,aiohttp:3,alia:10,alias:10,all:[10,12],alreadi:12,also:10,alter:10,an:[3,5,6,7,8,10,12],ani:[3,12],api:[3,9],apicli:3,appli:[5,10],apply_monkey_patch:10,ar:5,arg:8,arg_offset:5,argument:[3,5,8,9,10],around:3,async:[3,5,6,9],asynccach:5,asyncio:12,attempt:[6,9],attribut:10,authent:3,await:[9,12],awar:12,base:[3,5,8,12],befor:12,being:10,block:11,bool:[3,6,12],bot:[1,4,6,7,10],botcor:0,cach:[1,4,6,9],calcul:12,call:12,callabl:[5,9],can:[7,12],cancel:12,cancel_al:12,categori:6,category_id:6,caus:10,changelog:0,channel:[1,4],channel_id:6,check:[3,6,12],clear:5,clientrespons:3,clientsess:3,close:[3,12],cloudflar:10,code:11,cog:2,command:[6,7,10],common:[8,10,11],constructor:3,contain:[10,12],content:3,coro:[9,12],coroutin:[5,9,12],could:9,creat:[5,12],create_task:12,current:12,custom:[5,8],customlogg:8,datetim:12,decor:5,delai:12,delet:[3,5],depend:6,develop:[1,4],dict:3,directli:7,discord:[1,2,4,6,7,10,11],discord_invit:11,disnak:[6,7,9,10],distinguish:12,django:3,doesn:12,don:12,done:12,elsewher:12,endpoint:3,equival:3,error:[3,9,10],event:12,event_loop:12,exc_info:8,exce:5,except:[3,8,12],execut:12,exist:12,expect:9,express:11,ext:[0,1,6,7,10],extens:[1,4],extra:3,fail:6,failur:9,fetch:[6,9],fifo:5,fit:10,forbidden:6,format:11,formatted_code_regex:11,found:[9,12],from:[3,6,7,9,10,12],frozenset:7,futur:12,gener:12,get:[3,6,9],get_logg:8,get_or_fetch_channel:6,get_or_fetch_memb:9,given:[6,7,8,9,12],group:10,guild:9,guildchannel:6,ha:10,handl:[9,12],handle_role_chang:9,hashabl:12,have:[6,8],heavi:10,helper:[6,9],houston:8,how:[5,12],http:3,httpexcept:6,id:[6,12],identifi:12,ignor:10,immedi:12,implement:[5,8],index:0,indic:9,inform:[0,8],initi:[3,12],initialis:5,instanc:[3,5,6,8,12],instanti:12,instead:12,intend:9,interact:6,interactin:9,interest:8,intern:10,invalid:6,invaliddata:6,invit:11,is_in_categori:6,item:5,json:3,keep:12,kei:5,keyword:[3,8,10],known:12,kwarg:[3,8,12],level:[8,10],ll:12,load:[7,10],load_extens:7,log:[1,4,12],logger:8,look:[7,12],loop:12,lru:5,mai:5,make:8,mani:5,max_siz:5,maximum:5,maybe_raise_for_statu:3,member:[1,4],member_id:9,messag:[8,12],method:[3,8,10],modul:[7,12],moduletyp:7,monkei:10,monkey_patch:[1,4],msg:8,must:12,mypi:8,name:[7,8,10,12],namespac:12,need:10,non:3,none:[3,5,8,9,10,12],notfound:6,now:12,object:[3,5,6,9,10,12],offset:5,ok:3,onc:5,oper:12,option:[3,5,8,9],order:[5,12],other:12,otherwis:12,our:10,packag:7,page:0,paramet:[3,5,6,7,8,9,12],pass:[3,7,8,9,12],past:12,patch:[3,10],permiss:6,posit:5,post:3,prematur:12,prevent:12,problem:8,provid:[5,12],put:3,python:12,qualifi:7,rais:[3,6,9,12],raise_for_statu:3,rather:10,raw:11,raw_code_regex:11,re:12,receiv:[3,6],recognis:8,regex:[1,4],regular:11,relat:[5,8],remove_rol:9,represent:3,request:3,request_text:3,requir:12,respons:3,response_json:3,response_text:3,responsecodeerror:3,result:12,retriev:6,reusabl:2,role:9,root:10,root_alias:10,rout:10,run:12,s:[5,8,10,11,12],same:12,schedul:[1,4],schedule_at:12,schedule_lat:12,search:0,second:12,send:3,send_typ:10,sequenc:10,server:11,session:3,session_kwarg:3,set:7,sever:8,should:3,should_rais:3,site:3,site_api:[0,1],site_api_token:3,site_api_url:3,size:5,so:10,sole:9,sourc:[3,5,6,7,8,9,10,11,12],start:12,store:[5,10],str:[3,7,8,12],string:[3,7],submodul:0,subpackag:0,subtract:12,suggest:12,support:[10,12],suppressed_except:12,t:12,target:5,task:12,task_id:12,text:3,textchannel:6,than:10,them:12,thi:[6,9,10,12],thrown:10,time:12,timezon:12,token:3,tool:[1,4],top:10,trace:8,track:12,tupl:12,two:10,type:[3,5,6,7,8,9,10,12],unawait:12,under:10,union:12,uniqu:12,unknown:6,unqualifi:7,unschedul:12,url:3,us:[1,3,4,6,8,9,10,11,12],utc:12,util:[0,1,5,7,8],valu:8,valueerror:3,variou:6,wa:[6,12],wait:12,walk_extens:7,warn:12,we:[8,9],when:[3,5,10,12],whether:[3,6],which:[10,12],worker:10,wrap:[5,12],wrapper:[3,12],yield:7,you:6},titles:["Bot Core Project Documentation","Botcore","Exts","site_api","Utils","caching","channel","extensions","logging","members","monkey_patches","regex","scheduling"],titleterms:{bot:0,botcor:1,cach:5,channel:6,core:0,document:0,ext:2,extens:7,extra:0,log:8,member:9,modul:0,monkey_patch:10,other:0,project:0,refer:0,regex:11,schedul:12,site_api:3,submodul:[1,4],subpackag:1,util:4}})
\ No newline at end of file |