diff options
46 files changed, 2720 insertions, 199 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: af2f11ec1a39f6c48a03e3771dcad3de +config: 0239b374786f3e4260bf456f6ecb54e3 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/.doctrees/changelog.doctree b/.doctrees/changelog.doctree Binary files differdeleted file mode 100644 index 5ba6ae36..00000000 --- a/.doctrees/changelog.doctree +++ /dev/null diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle Binary files differindex b52427f3..da134719 100644 --- a/.doctrees/environment.pickle +++ b/.doctrees/environment.pickle diff --git a/.doctrees/index.doctree b/.doctrees/index.doctree Binary files differindex 76b7713d..7f4b8bd8 100644 --- a/.doctrees/index.doctree +++ b/.doctrees/index.doctree diff --git a/.doctrees/output/botcore.doctree b/.doctrees/output/botcore.doctree Binary files differindex 139adcab..7873d135 100644 --- a/.doctrees/output/botcore.doctree +++ b/.doctrees/output/botcore.doctree diff --git a/.doctrees/output/botcore.exts.doctree b/.doctrees/output/botcore.exts.doctree Binary files differnew file mode 100644 index 00000000..2dd72edc --- /dev/null +++ b/.doctrees/output/botcore.exts.doctree diff --git a/.doctrees/output/botcore.regex.doctree b/.doctrees/output/botcore.regex.doctree Binary files differdeleted file mode 100644 index c73fc10f..00000000 --- a/.doctrees/output/botcore.regex.doctree +++ /dev/null diff --git a/.doctrees/output/botcore.utils.caching.doctree b/.doctrees/output/botcore.utils.caching.doctree Binary files differnew file mode 100644 index 00000000..ef204d3f --- /dev/null +++ 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 differnew file mode 100644 index 00000000..4841c400 --- /dev/null +++ b/.doctrees/output/botcore.utils.channel.doctree diff --git a/.doctrees/output/botcore.utils.doctree b/.doctrees/output/botcore.utils.doctree Binary files differnew file mode 100644 index 00000000..f94a5443 --- /dev/null +++ b/.doctrees/output/botcore.utils.doctree diff --git a/.doctrees/output/botcore.utils.extensions.doctree b/.doctrees/output/botcore.utils.extensions.doctree Binary files differnew file mode 100644 index 00000000..713d12c1 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..d165cb29 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..bf9473d8 --- /dev/null +++ b/.doctrees/output/botcore.utils.members.doctree diff --git a/.doctrees/output/botcore.utils.regex.doctree b/.doctrees/output/botcore.utils.regex.doctree Binary files differnew file mode 100644 index 00000000..b2592f09 --- /dev/null +++ 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 differnew file mode 100644 index 00000000..a0cc4892 --- /dev/null +++ b/.doctrees/output/botcore.utils.scheduling.doctree diff --git a/_sources/changelog.rst.txt b/_sources/changelog.rst.txt deleted file mode 100644 index 743fcc20..00000000 --- a/_sources/changelog.rst.txt +++ /dev/null @@ -1,14 +0,0 @@ -.. See docs for details on formatting your entries - https://releases.readthedocs.io/en/latest/concepts.html - - -Changelog -========= - -- :release:`1.2.0 <9th January 2022>` -- :feature:`12` Code block detection regex -- :release:`1.1.0 <2nd December 2021>` -- :support:`2` Autogenerated docs. -- :feature:`2` Regex utility. -- :release:`1.0.0 <17th November 2021>` -- :support:`1` Core package, poetry, and linting CI. diff --git a/_sources/index.rst.txt b/_sources/index.rst.txt index e7c25ef1..81975f35 100644 --- a/_sources/index.rst.txt +++ b/_sources/index.rst.txt @@ -13,11 +13,6 @@ Reference output/botcore -.. toctree:: - :caption: Other: - - changelog - Extras ================== @@ -25,3 +20,4 @@ Extras * :ref:`genindex` * :ref:`search` * :repo-file:`Information <docs/README.md>` +* :repo-file:`Changelog <CHANGELOG.md>` diff --git a/_sources/output/botcore.exts.rst.txt b/_sources/output/botcore.exts.rst.txt new file mode 100644 index 00000000..38d2fc2e --- /dev/null +++ b/_sources/output/botcore.exts.rst.txt @@ -0,0 +1,7 @@ +Exts +==== + +.. automodule:: botcore.exts + :members: + :special-members: + :show-inheritance: diff --git a/_sources/output/botcore.regex.rst.txt b/_sources/output/botcore.regex.rst.txt deleted file mode 100644 index 2217ae38..00000000 --- a/_sources/output/botcore.regex.rst.txt +++ /dev/null @@ -1,7 +0,0 @@ -regex -==================== - -.. automodule:: botcore.regex - :members: - :special-members: - :show-inheritance:
\ No newline at end of file diff --git a/_sources/output/botcore.rst.txt b/_sources/output/botcore.rst.txt index f61d0b5b..55faa144 100644 --- a/_sources/output/botcore.rst.txt +++ b/_sources/output/botcore.rst.txt @@ -1,8 +1,16 @@ Botcore ======= +.. automodule:: botcore + :members: + :special-members: + :show-inheritance: + +Subpackages +----------- + .. toctree:: :maxdepth: 4 - botcore.regex - + botcore.exts + botcore.utils diff --git a/_sources/output/botcore.utils.caching.rst.txt b/_sources/output/botcore.utils.caching.rst.txt new file mode 100644 index 00000000..02c2105d --- /dev/null +++ b/_sources/output/botcore.utils.caching.rst.txt @@ -0,0 +1,7 @@ +caching +============================ + +.. automodule:: botcore.utils.caching + :members: + :special-members: + :show-inheritance: diff --git a/_sources/output/botcore.utils.channel.rst.txt b/_sources/output/botcore.utils.channel.rst.txt new file mode 100644 index 00000000..460975f4 --- /dev/null +++ b/_sources/output/botcore.utils.channel.rst.txt @@ -0,0 +1,7 @@ +channel +============================ + +.. automodule:: botcore.utils.channel + :members: + :special-members: + :show-inheritance: diff --git a/_sources/output/botcore.utils.extensions.rst.txt b/_sources/output/botcore.utils.extensions.rst.txt new file mode 100644 index 00000000..65c40bbf --- /dev/null +++ b/_sources/output/botcore.utils.extensions.rst.txt @@ -0,0 +1,7 @@ +extensions +=============================== + +.. automodule:: botcore.utils.extensions + :members: + :special-members: + :show-inheritance: diff --git a/_sources/output/botcore.utils.logging.rst.txt b/_sources/output/botcore.utils.logging.rst.txt new file mode 100644 index 00000000..a719bfa7 --- /dev/null +++ b/_sources/output/botcore.utils.logging.rst.txt @@ -0,0 +1,7 @@ +logging +============================ + +.. automodule:: botcore.utils.logging + :members: + :special-members: + :show-inheritance: diff --git a/_sources/output/botcore.utils.members.rst.txt b/_sources/output/botcore.utils.members.rst.txt new file mode 100644 index 00000000..ab65d36b --- /dev/null +++ b/_sources/output/botcore.utils.members.rst.txt @@ -0,0 +1,7 @@ +members +============================ + +.. automodule:: botcore.utils.members + :members: + :special-members: + :show-inheritance: diff --git a/_sources/output/botcore.utils.regex.rst.txt b/_sources/output/botcore.utils.regex.rst.txt new file mode 100644 index 00000000..405e416a --- /dev/null +++ b/_sources/output/botcore.utils.regex.rst.txt @@ -0,0 +1,7 @@ +regex +========================== + +.. automodule:: botcore.utils.regex + :members: + :special-members: + :show-inheritance: diff --git a/_sources/output/botcore.utils.rst.txt b/_sources/output/botcore.utils.rst.txt new file mode 100644 index 00000000..6c59b47f --- /dev/null +++ b/_sources/output/botcore.utils.rst.txt @@ -0,0 +1,21 @@ +Utils +===== + +.. automodule:: botcore.utils + :members: + :special-members: + :show-inheritance: + +Submodules +---------- + +.. toctree:: + :maxdepth: 4 + + botcore.utils.caching + botcore.utils.channel + botcore.utils.extensions + botcore.utils.logging + botcore.utils.members + botcore.utils.regex + botcore.utils.scheduling diff --git a/_sources/output/botcore.utils.scheduling.rst.txt b/_sources/output/botcore.utils.scheduling.rst.txt new file mode 100644 index 00000000..41ffe1c6 --- /dev/null +++ b/_sources/output/botcore.utils.scheduling.rst.txt @@ -0,0 +1,7 @@ +scheduling +=============================== + +.. automodule:: botcore.utils.scheduling + :members: + :special-members: + :show-inheritance: diff --git a/_static/changelog.css b/_static/changelog.css deleted file mode 100644 index 343792a1..00000000 --- a/_static/changelog.css +++ /dev/null @@ -1,11 +0,0 @@ -[data-theme='dark'] #changelog .dark, -[data-theme='light'] #changelog .light, -[data-theme='auto'] #changelog .light { - display: inline; -} - -[data-theme='dark'] #changelog .light, -[data-theme='light'] #changelog .dark, -[data-theme='auto'] #changelog .dark { - display: none; -} diff --git a/_static/changelog.js b/_static/changelog.js deleted file mode 100644 index f72d025c..00000000 --- a/_static/changelog.js +++ /dev/null @@ -1,37 +0,0 @@ -/** Update the changelog colors in dark mode */ - -const changelog = document.getElementById("changelog"); - -function updateEntryColor(entry) { - const line = entry.lastChild; - const lightColorSpan = line.childNodes.item(1); - const darkColorSpan = lightColorSpan.cloneNode(true); - - line.insertBefore(darkColorSpan, lightColorSpan); - - lightColorSpan.classList.add("light"); - darkColorSpan.classList.add("dark"); - - let color; - switch (darkColorSpan.textContent) { - case "Feature": - color = "#5BF38E"; - break; - case "Support": - color = "#55A5E7"; - break; - case "Bug": - color = "#E14F4F"; - break; - default: - color = null; - } - - darkColorSpan.style["color"] = color; -} - -if (changelog !== null) { - for (let collection of changelog.getElementsByClassName("simple")) { - Array.from(collection.children).forEach(updateEntryColor); - } -} diff --git a/genindex.html b/genindex.html index 6dbd8c02..0d4c9494 100644 --- a/genindex.html +++ b/genindex.html @@ -8,7 +8,6 @@ <link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=df49af52631e7917044a9c21a57f7b83170a6dd0" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=fade93df149f7c5fedb3ff897f799dc7d283b420" /> - <link rel="stylesheet" type="text/css" href="_static/changelog.css" /> <link rel="stylesheet" type="text/css" href="_static/logo.css" /> @@ -161,13 +160,19 @@ <p class="caption" role="heading"><span class="caption-text">Modules:</span></p> <ul> <li class="toctree-l1 has-children"><a class="reference internal" href="output/botcore.html">Botcore</a><input 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> -<li class="toctree-l2"><a class="reference internal" href="output/botcore.regex.html">regex</a></li> +<li class="toctree-l2"><a class="reference internal" href="output/botcore.exts.html">Exts</a></li> +<li class="toctree-l2 has-children"><a class="reference internal" href="output/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="output/botcore.utils.caching.html">caching</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.channel.html">channel</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.extensions.html">extensions</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.logging.html">logging</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.members.html">members</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.regex.html">regex</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.scheduling.html">scheduling</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 internal" href="changelog.html">Changelog</a></li> +</li> </ul> </div> @@ -197,19 +202,134 @@ <section class="genindex-section"> <h1 id="index">Index</h1> - <div class="genindex-jumpbox"><a href="#B"><strong>B</strong></a> | <a href="#D"><strong>D</strong></a> | <a href="#F"><strong>F</strong></a> | <a href="#M"><strong>M</strong></a> | <a href="#R"><strong>R</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="#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> + <table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.utils.caching.html#botcore.utils.caching.AsyncCache.__call__">__call__() (AsyncCache method)</a> +</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> + + <ul> + <li><a href="output/botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler.__init__">(Scheduler method)</a> +</li> + </ul></li> + </ul></td> + </tr></table> +</section> + +<section id="A" class="genindex-section"> + <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.caching.html#botcore.utils.caching.AsyncCache">AsyncCache (class in botcore.utils.caching)</a> +</li> + </ul></td> + </tr></table> </section> + <section id="B" class="genindex-section"> <h2>B</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%; vertical-align: top;"><ul> <li> - botcore.regex + botcore + + <ul> + <li><a href="output/botcore.html#module-botcore">module</a> +</li> + </ul></li> + <li> + botcore.exts + + <ul> + <li><a href="output/botcore.exts.html#module-botcore.exts">module</a> +</li> + </ul></li> + <li> + botcore.utils + + <ul> + <li><a href="output/botcore.utils.html#module-botcore.utils">module</a> +</li> + </ul></li> + <li> + botcore.utils.caching <ul> - <li><a href="output/botcore.regex.html#module-botcore.regex">module</a> + <li><a href="output/botcore.utils.caching.html#module-botcore.utils.caching">module</a> </li> </ul></li> + <li> + botcore.utils.channel + + <ul> + <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 + + <ul> + <li><a href="output/botcore.utils.extensions.html#module-botcore.utils.extensions">module</a> +</li> + </ul></li> + <li> + botcore.utils.logging + + <ul> + <li><a href="output/botcore.utils.logging.html#module-botcore.utils.logging">module</a> +</li> + </ul></li> + <li> + botcore.utils.members + + <ul> + <li><a href="output/botcore.utils.members.html#module-botcore.utils.members">module</a> +</li> + </ul></li> + <li> + botcore.utils.regex + + <ul> + <li><a href="output/botcore.utils.regex.html#module-botcore.utils.regex">module</a> +</li> + </ul></li> + <li> + botcore.utils.scheduling + + <ul> + <li><a href="output/botcore.utils.scheduling.html#module-botcore.utils.scheduling">module</a> +</li> + </ul></li> + </ul></td> + </tr></table> +</section> + +<section id="C" class="genindex-section"> + <h2>C</h2> + <table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler.cancel">cancel() (Scheduler method)</a> +</li> + <li><a href="output/botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler.cancel_all">cancel_all() (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.clear">clear() (AsyncCache 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> + <li><a href="output/botcore.utils.logging.html#botcore.utils.logging.CustomLogger">CustomLogger (class in botcore.utils.logging)</a> +</li> </ul></td> </tr></table> </section> @@ -218,7 +338,7 @@ <h2>D</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%; vertical-align: top;"><ul> - <li><a href="output/botcore.regex.html#botcore.regex.DISCORD_INVITE">DISCORD_INVITE (in module botcore.regex)</a> + <li><a href="output/botcore.utils.regex.html#botcore.utils.regex.DISCORD_INVITE">DISCORD_INVITE (in module botcore.utils.regex)</a> </li> </ul></td> </tr></table> @@ -228,7 +348,43 @@ <h2>F</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%; vertical-align: top;"><ul> - <li><a href="output/botcore.regex.html#botcore.regex.FORMATTED_CODE_REGEX">FORMATTED_CODE_REGEX (in module botcore.regex)</a> + <li><a href="output/botcore.utils.regex.html#botcore.utils.regex.FORMATTED_CODE_REGEX">FORMATTED_CODE_REGEX (in module botcore.utils.regex)</a> +</li> + </ul></td> + </tr></table> +</section> + +<section id="G" class="genindex-section"> + <h2>G</h2> + <table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.utils.logging.html#botcore.utils.logging.get_logger">get_logger() (in module botcore.utils.logging)</a> +</li> + </ul></td> + <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.utils.channel.html#botcore.utils.channel.get_or_fetch_channel">get_or_fetch_channel() (in module botcore.utils.channel)</a> +</li> + <li><a href="output/botcore.utils.members.html#botcore.utils.members.get_or_fetch_member">get_or_fetch_member() (in module botcore.utils.members)</a> +</li> + </ul></td> + </tr></table> +</section> + +<section id="H" class="genindex-section"> + <h2>H</h2> + <table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.utils.members.html#botcore.utils.members.handle_role_change">handle_role_change() (in module botcore.utils.members)</a> +</li> + </ul></td> + </tr></table> +</section> + +<section id="I" class="genindex-section"> + <h2>I</h2> + <table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.utils.channel.html#botcore.utils.channel.is_in_category">is_in_category() (in module botcore.utils.channel)</a> </li> </ul></td> </tr></table> @@ -242,7 +398,25 @@ module <ul> - <li><a href="output/botcore.regex.html#module-botcore.regex">botcore.regex</a> + <li><a href="output/botcore.html#module-botcore">botcore</a> +</li> + <li><a href="output/botcore.exts.html#module-botcore.exts">botcore.exts</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> +</li> + <li><a href="output/botcore.utils.channel.html#module-botcore.utils.channel">botcore.utils.channel</a> +</li> + <li><a href="output/botcore.utils.extensions.html#module-botcore.utils.extensions">botcore.utils.extensions</a> +</li> + <li><a href="output/botcore.utils.logging.html#module-botcore.utils.logging">botcore.utils.logging</a> +</li> + <li><a href="output/botcore.utils.members.html#module-botcore.utils.members">botcore.utils.members</a> +</li> + <li><a href="output/botcore.utils.regex.html#module-botcore.utils.regex">botcore.utils.regex</a> +</li> + <li><a href="output/botcore.utils.scheduling.html#module-botcore.utils.scheduling">botcore.utils.scheduling</a> </li> </ul></li> </ul></td> @@ -253,7 +427,55 @@ <h2>R</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%; vertical-align: top;"><ul> - <li><a href="output/botcore.regex.html#botcore.regex.RAW_CODE_REGEX">RAW_CODE_REGEX (in module botcore.regex)</a> + <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> + </tr></table> +</section> + +<section id="S" class="genindex-section"> + <h2>S</h2> + <table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler.schedule">schedule() (Scheduler method)</a> +</li> + <li><a href="output/botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler.schedule_at">schedule_at() (Scheduler method)</a> +</li> + </ul></td> + <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler.schedule_later">schedule_later() (Scheduler method)</a> +</li> + <li><a href="output/botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler">Scheduler (class in botcore.utils.scheduling)</a> +</li> + </ul></td> + </tr></table> +</section> + +<section id="T" class="genindex-section"> + <h2>T</h2> + <table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.utils.logging.html#botcore.utils.logging.CustomLogger.trace">trace() (CustomLogger method)</a> +</li> + </ul></td> + </tr></table> +</section> + +<section id="U" class="genindex-section"> + <h2>U</h2> + <table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.utils.extensions.html#botcore.utils.extensions.unqualify">unqualify() (in module botcore.utils.extensions)</a> +</li> + </ul></td> + </tr></table> +</section> + +<section id="W" class="genindex-section"> + <h2>W</h2> + <table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="output/botcore.utils.extensions.html#botcore.utils.extensions.walk_extensions">walk_extensions() (in module botcore.utils.extensions)</a> </li> </ul></td> </tr></table> @@ -288,6 +510,5 @@ <script src="_static/underscore.js"></script> <script src="_static/doctools.js"></script> <script src="_static/scripts/furo.js"></script> - <script src="_static/changelog.js"></script> </body> </html>
\ No newline at end of file @@ -10,7 +10,6 @@ <link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=df49af52631e7917044a9c21a57f7b83170a6dd0" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=fade93df149f7c5fedb3ff897f799dc7d283b420" /> - <link rel="stylesheet" type="text/css" href="_static/changelog.css" /> <link rel="stylesheet" type="text/css" href="_static/logo.css" /> @@ -163,13 +162,19 @@ <p class="caption" role="heading"><span class="caption-text">Modules:</span></p> <ul> <li class="toctree-l1 has-children"><a class="reference internal" href="output/botcore.html">Botcore</a><input 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> -<li class="toctree-l2"><a class="reference internal" href="output/botcore.regex.html">regex</a></li> +<li class="toctree-l2"><a class="reference internal" href="output/botcore.exts.html">Exts</a></li> +<li class="toctree-l2 has-children"><a class="reference internal" href="output/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="output/botcore.utils.caching.html">caching</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.channel.html">channel</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.extensions.html">extensions</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.logging.html">logging</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.members.html">members</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.regex.html">regex</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.scheduling.html">scheduling</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 internal" href="changelog.html">Changelog</a></li> +</li> </ul> </div> @@ -205,15 +210,16 @@ <p class="caption" role="heading"><span class="caption-text">Modules:</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="output/botcore.html">Botcore</a><ul> -<li class="toctree-l2"><a class="reference internal" href="output/botcore.regex.html">regex</a></li> +<li class="toctree-l2"><a class="reference internal" href="output/botcore.html#subpackages">Subpackages</a><ul> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.exts.html">Exts</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.html">Utils</a><ul> +<li class="toctree-l4"><a class="reference internal" href="output/botcore.utils.html#submodules">Submodules</a></li> </ul> </li> </ul> -</div> -<div class="toctree-wrapper compound"> -<p class="caption" role="heading"><span class="caption-text">Other:</span></p> -<ul> -<li class="toctree-l1"><a class="reference internal" href="changelog.html">Changelog</a></li> +</li> +</ul> +</li> </ul> </div> </section> @@ -223,6 +229,7 @@ <li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li> <li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li> <li><p><a class="reference external" href="https://github.com/python-discord/bot-core/blob/main/docs/README.md">Information</a></p></li> +<li><p><a class="reference external" href="https://github.com/python-discord/bot-core/blob/main/CHANGELOG.md">Changelog</a></p></li> </ul> </section> @@ -268,9 +275,7 @@ <div class="toc-tree"> <ul> <li><a class="reference internal" href="#">Bot Core Project Documentation</a></li> -<li><a class="reference internal" href="#reference">Reference</a><ul> -</ul> -</li> +<li><a class="reference internal" href="#reference">Reference</a></li> <li><a class="reference internal" href="#extras">Extras</a></li> </ul> @@ -286,6 +291,5 @@ <script src="_static/underscore.js"></script> <script src="_static/doctools.js"></script> <script src="_static/scripts/furo.js"></script> - <script src="_static/changelog.js"></script> </body> </html>
\ No newline at end of file diff --git a/objects.inv b/objects.inv Binary files differindex b10bd753..7e8a40e8 100644 --- a/objects.inv +++ b/objects.inv diff --git a/changelog.html b/output/botcore.exts.html index 8552cc02..d20a582e 100644 --- a/changelog.html +++ b/output/botcore.exts.html @@ -3,15 +3,14 @@ <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="output/botcore.regex.html" /> +<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.01.02"/> - <title>Changelog - Bot Core v1.2.0</title> - <link rel="stylesheet" type="text/css" href="_static/pygments.css" /> - <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=df49af52631e7917044a9c21a57f7b83170a6dd0" /> - <link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=fade93df149f7c5fedb3ff897f799dc7d283b420" /> - <link rel="stylesheet" type="text/css" href="_static/changelog.css" /> - <link rel="stylesheet" type="text/css" href="_static/logo.css" /> + <title>Exts - Bot Core v1.2.0</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> + <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=df49af52631e7917044a9c21a57f7b83170a6dd0" /> + <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?digest=fade93df149f7c5fedb3ff897f799dc7d283b420" /> + <link rel="stylesheet" type="text/css" href="../_static/logo.css" /> @@ -126,7 +125,7 @@ </label> </div> <div class="header-center"> - <a href="index.html"><div class="brand">Bot Core v1.2.0</div></a> + <a href="../index.html"><div class="brand">Bot Core v1.2.0</div></a> </div> <div class="header-right"> <div class="theme-toggle-container theme-toggle-header"> @@ -146,7 +145,7 @@ <aside class="sidebar-drawer"> <div class="sidebar-container"> - <div class="sidebar-sticky"><a class="sidebar-brand centered" href="index.html"> + <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"/> @@ -154,22 +153,28 @@ <span class="sidebar-brand-text">Bot Core v1.2.0</span> -</a><form class="sidebar-search-container" method="get" action="search.html" role="search"> +</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> -<li class="toctree-l1 has-children"><a class="reference internal" href="output/botcore.html">Botcore</a><input 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> -<li class="toctree-l2"><a class="reference internal" href="output/botcore.regex.html">regex</a></li> +<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 current current-page"><a class="current reference internal" href="#">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.regex.html">regex</a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> </ul> </li> </ul> -<p class="caption" role="heading"><span class="caption-text">Other:</span></p> -<ul class="current"> -<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">Changelog</a></li> +</li> </ul> </div> @@ -196,24 +201,9 @@ </label> </div> <article role="main"> - <section id="changelog"> -<h1>Changelog<a class="headerlink" href="#changelog" title="Permalink to this headline">¶</a></h1> -<section id="1.2.0"> -<h2 style="margin-bottom: 0.3em;"><a class="reference external" href="https://github.com/python-discord/bot-core/tree/1.2.0">1.2.0</a> <span style="font-size: 75%;">9th January 2022</span></h2><ul class="simple"> -<li><p>[<span style="color: #40A056;">Feature</span>]<span> </span><a class="reference external" href="https://github.com/python-discord/bot-core/issues/12">#12</a><span>:</span> Code block detection regex</p></li> -</ul> -</section> -<section id="1.1.0"> -<h2 style="margin-bottom: 0.3em;"><a class="reference external" href="https://github.com/python-discord/bot-core/tree/1.1.0">1.1.0</a> <span style="font-size: 75%;">2nd December 2021</span></h2><ul class="simple"> -<li><p>[<span style="color: #40A056;">Feature</span>]<span> </span><a class="reference external" href="https://github.com/python-discord/bot-core/issues/2">#2</a><span>:</span> Regex utility.</p></li> -<li><p>[<span style="color: #4070A0;">Support</span>]<span> </span><a class="reference external" href="https://github.com/python-discord/bot-core/issues/2">#2</a><span>:</span> Autogenerated docs.</p></li> -</ul> -</section> -<section id="1.0.0"> -<h2 style="margin-bottom: 0.3em;"><a class="reference external" href="https://github.com/python-discord/bot-core/tree/1.0.0">1.0.0</a> <span style="font-size: 75%;">17th November 2021</span></h2><ul class="simple"> -<li><p>[<span style="color: #4070A0;">Support</span>]<span> </span><a class="reference external" href="https://github.com/python-discord/bot-core/issues/1">#1</a><span>:</span> Core package, poetry, and linting CI.</p></li> -</ul> -</section> + <section id="module-botcore.exts"> +<span id="exts"></span><h1>Exts<a class="headerlink" href="#module-botcore.exts" title="Permalink to this headline">¶</a></h1> +<p>Reusable discord cogs.</p> </section> </article> @@ -221,15 +211,23 @@ <footer> <div class="related-pages"> - - <a class="prev-page" href="output/botcore.regex.html"> + <a class="next-page" href="botcore.utils.html"> + <div class="page-info"> + <div class="context"> + <span>Next</span> + </div> + <div class="title">Utils</div> + </div> + <svg><use href="#svg-arrow-right"></use></svg> + </a> + <a class="prev-page" href="botcore.html"> <svg><use href="#svg-arrow-right"></use></svg> <div class="page-info"> <div class="context"> <span>Previous</span> </div> - <div class="title">regex</div> + <div class="title">Botcore</div> </div> </a> @@ -239,7 +237,7 @@ Copyright © 2021, Python Discord | Created using <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 theme</a>. - | <a class="muted-link" href="_sources/changelog.rst.txt" + | <a class="muted-link" href="../_sources/output/botcore.exts.rst.txt" rel="nofollow"> Show Source </a> @@ -253,11 +251,10 @@ </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> - <script src="_static/changelog.js"></script> +</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.html b/output/botcore.html index 9db6d60e..fe512241 100644 --- a/output/botcore.html +++ b/output/botcore.html @@ -3,14 +3,13 @@ <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="next" title="regex" href="botcore.regex.html" /><link rel="prev" title="Bot Core Project Documentation" href="../index.html" /> +<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.01.02"/> <title>Botcore - Bot Core v1.2.0</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=df49af52631e7917044a9c21a57f7b83170a6dd0" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?digest=fade93df149f7c5fedb3ff897f799dc7d283b420" /> - <link rel="stylesheet" type="text/css" href="../_static/changelog.css" /> <link rel="stylesheet" type="text/css" href="../_static/logo.css" /> @@ -137,7 +136,7 @@ <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"> + <label class="toc-overlay-icon toc-header-icon" for="__toc"> <div class="visually-hidden">Toggle table of contents sidebar</div> <i class="icon"><svg><use href="#svg-toc"></use></svg></i> </label> @@ -163,13 +162,19 @@ <p class="caption" role="heading"><span class="caption-text">Modules:</span></p> <ul class="current"> <li class="toctree-l1 current has-children current-page"><a class="current reference internal" href="#">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> -<li class="toctree-l2"><a class="reference internal" href="botcore.regex.html">regex</a></li> +<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.regex.html">regex</a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</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 internal" href="../changelog.html">Changelog</a></li> +</li> </ul> </div> @@ -190,32 +195,49 @@ <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"> + <label class="toc-overlay-icon toc-content-icon" 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="botcore"> -<h1>Botcore<a class="headerlink" href="#botcore" title="Permalink to this headline">¶</a></h1> + <section id="module-botcore"> +<span id="botcore"></span><h1>Botcore<a class="headerlink" href="#module-botcore" title="Permalink to this headline">¶</a></h1> +<p>Useful utilities and tools for discord bot development.</p> +<section id="subpackages"> +<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h2> <div class="toctree-wrapper compound"> <ul> -<li class="toctree-l1"><a class="reference internal" href="botcore.regex.html">regex</a></li> +<li class="toctree-l1"><a class="reference internal" href="botcore.exts.html">Exts</a></li> +<li class="toctree-l1"><a class="reference internal" href="botcore.utils.html">Utils</a><ul> +<li class="toctree-l2"><a class="reference internal" href="botcore.utils.html#submodules">Submodules</a><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.regex.html">regex</a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> +</ul> +</li> +</ul> +</li> </ul> </div> </section> +</section> </article> </div> <footer> <div class="related-pages"> - <a class="next-page" href="botcore.regex.html"> + <a class="next-page" href="botcore.exts.html"> <div class="page-info"> <div class="context"> <span>Next</span> </div> - <div class="title">regex</div> + <div class="title">Exts</div> </div> <svg><use href="#svg-arrow-right"></use></svg> </a> @@ -244,8 +266,27 @@ </footer> </div> - <aside class="toc-drawer no-toc"> + <aside class="toc-drawer"> + + <div class="toc-sticky toc-scroll"> + <div class="toc-title-container"> + <span class="toc-title"> + Contents + </span> + </div> + <div class="toc-tree-container"> + <div class="toc-tree"> + <ul> +<li><a class="reference internal" href="#">Botcore</a><ul> +<li><a class="reference internal" href="#subpackages">Subpackages</a></li> +</ul> +</li> +</ul> + + </div> + </div> + </div> </aside> @@ -255,6 +296,5 @@ <script src="../_static/underscore.js"></script> <script src="../_static/doctools.js"></script> <script src="../_static/scripts/furo.js"></script> - <script src="../_static/changelog.js"></script> </body> </html>
\ No newline at end of file diff --git a/output/botcore.utils.caching.html b/output/botcore.utils.caching.html new file mode 100644 index 00000000..f8a1b152 --- /dev/null +++ b/output/botcore.utils.caching.html @@ -0,0 +1,304 @@ +<!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="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.01.02"/> + <title>caching - Bot Core v1.2.0</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> + <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=df49af52631e7917044a9c21a57f7b83170a6dd0" /> + <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?digest=fade93df149f7c5fedb3ff897f799dc7d283b420" /> + <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 xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" + stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> + <path stroke="none" d="M0 0h24v24H0z" /> + <line x1="4" y1="6" x2="20" y2="6" /> + <line x1="10" y1="12" x2="20" y2="12" /> + <line x1="6" y1="18" x2="20" y2="18" /> + </svg> + </symbol> + <symbol id="svg-menu" viewBox="0 0 24 24"> + <title>Menu</title> + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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 v1.2.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 v1.2.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 current has-children"><a class="reference internal" href="botcore.utils.html">Utils</a><input checked="" 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 class="current"> +<li class="toctree-l3 current current-page"><a class="current reference internal" href="#">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.regex.html">regex</a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> +</ul> +</li> +</ul> +</li> +</ul> + +</div> +</div> + </div> + + </div> + </aside> + <div class="main"> + <div class="content"> + <div class="article-container"> + <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.utils.caching"> +<span id="caching"></span><h1>caching<a class="headerlink" href="#module-botcore.utils.caching" title="Permalink to this headline">¶</a></h1> +<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/554919b6314814320f35431a6cfb32ca81b09079/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/554919b6314814320f35431a6cfb32ca81b09079/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> +<dd class="field-odd"><p><strong>arg_offset</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – The offset for the position of the key argument.</p> +</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.Callable" title="(in Python v3.10)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Callable</span></code></a></p> +</dd> +<dt class="field-odd">Returns</dt> +<dd class="field-odd"><p>A decorator to wrap the target function.</p> +</dd> +</dl> +</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/554919b6314814320f35431a6cfb32ca81b09079/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> +<dd class="field-odd"><p><strong>max_size</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – How many items to store in the cache.</p> +</dd> +</dl> +</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/554919b6314814320f35431a6cfb32ca81b09079/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> +<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> +</dd></dl> +</section> + + </article> + </div> + <footer> + + <div class="related-pages"> + <a class="next-page" href="botcore.utils.channel.html"> + <div class="page-info"> + <div class="context"> + <span>Next</span> + </div> + <div class="title">channel</div> + </div> + <svg><use href="#svg-arrow-right"></use></svg> + </a> + <a class="prev-page" href="botcore.utils.html"> + <svg><use href="#svg-arrow-right"></use></svg> + <div class="page-info"> + <div class="context"> + <span>Previous</span> + </div> + + <div class="title">Utils</div> + + </div> + </a> + </div> + + <div class="related-information"> + Copyright © 2021, Python Discord | + Created using <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 theme</a>. + | <a class="muted-link" href="../_sources/output/botcore.utils.caching.rst.txt" + rel="nofollow"> + Show Source + </a> + </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.channel.html b/output/botcore.utils.channel.html new file mode 100644 index 00000000..d7a544a9 --- /dev/null +++ b/output/botcore.utils.channel.html @@ -0,0 +1,306 @@ +<!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="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.01.02"/> + <title>channel - Bot Core v1.2.0</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> + <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=df49af52631e7917044a9c21a57f7b83170a6dd0" /> + <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?digest=fade93df149f7c5fedb3ff897f799dc7d283b420" /> + <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 xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" + stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> + <path stroke="none" d="M0 0h24v24H0z" /> + <line x1="4" y1="6" x2="20" y2="6" /> + <line x1="10" y1="12" x2="20" y2="12" /> + <line x1="6" y1="18" x2="20" y2="18" /> + </svg> + </symbol> + <symbol id="svg-menu" viewBox="0 0 24 24"> + <title>Menu</title> + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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 v1.2.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 v1.2.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 current has-children"><a class="reference internal" href="botcore.utils.html">Utils</a><input checked="" 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 class="current"> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.caching.html">caching</a></li> +<li class="toctree-l3 current current-page"><a class="current reference internal" href="#">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.regex.html">regex</a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> +</ul> +</li> +</ul> +</li> +</ul> + +</div> +</div> + </div> + + </div> + </aside> + <div class="main"> + <div class="content"> + <div class="article-container"> + <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.utils.channel"> +<span id="channel"></span><h1>channel<a class="headerlink" href="#module-botcore.utils.channel" title="Permalink to this headline">¶</a></h1> +<p>Useful helper functions for interacting with various discord.py 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/554919b6314814320f35431a6cfb32ca81b09079/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> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>bot</strong> (<a class="reference external" href="https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Bot" title="(in discord.py v2.0.0a)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Bot</span></code></a>) – The <a class="reference external" href="https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Bot" title="(in discord.py v2.0.0a)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">discord.ext.commands.Bot</span></code></a> instance to use for getting/fetching.</p></li> +<li><p><strong>channel_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – The channel to get/fetch.</p></li> +</ul> +</dd> +<dt class="field-even">Raises</dt> +<dd class="field-even"><ul class="simple"> +<li><p><a class="reference external" href="https://discordpy.readthedocs.io/en/master/api.html#discord.InvalidData" title="(in discord.py v2.0.0a)"><strong>discord.InvalidData</strong></a> – An unknown channel type was received from Discord.</p></li> +<li><p><a class="reference external" href="https://discordpy.readthedocs.io/en/master/api.html#discord.HTTPException" title="(in discord.py v2.0.0a)"><strong>discord.HTTPException</strong></a> – Retrieving the channel failed.</p></li> +<li><p><a class="reference external" href="https://discordpy.readthedocs.io/en/master/api.html#discord.NotFound" title="(in discord.py v2.0.0a)"><strong>discord.NotFound</strong></a> – Invalid Channel ID.</p></li> +<li><p><a class="reference external" href="https://discordpy.readthedocs.io/en/master/api.html#discord.Forbidden" title="(in discord.py v2.0.0a)"><strong>discord.Forbidden</strong></a> – You do not have permission to fetch this channel.</p></li> +</ul> +</dd> +<dt class="field-odd">Return type</dt> +<dd class="field-odd"><p><a class="reference external" href="https://discordpy.readthedocs.io/en/master/api.html#discord.abc.GuildChannel" title="(in discord.py v2.0.0a)"><code class="xref py py-class docutils literal notranslate"><span class="pre">GuildChannel</span></code></a></p> +</dd> +<dt class="field-even">Returns</dt> +<dd class="field-even"><p>The channel from the ID.</p> +</dd> +</dl> +</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/554919b6314814320f35431a6cfb32ca81b09079/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> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>channel</strong> (<a class="reference external" href="https://discordpy.readthedocs.io/en/master/api.html#discord.TextChannel" title="(in discord.py v2.0.0a)"><code class="xref py py-class docutils literal notranslate"><span class="pre">TextChannel</span></code></a>) – The channel to check.</p></li> +<li><p><strong>category_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – The category to check for.</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/functions.html#bool" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a></p> +</dd> +<dt class="field-odd">Returns</dt> +<dd class="field-odd"><p>A bool depending on whether the channel is in the category.</p> +</dd> +</dl> +</dd></dl> +</section> + + </article> + </div> + <footer> + + <div class="related-pages"> + <a class="next-page" href="botcore.utils.extensions.html"> + <div class="page-info"> + <div class="context"> + <span>Next</span> + </div> + <div class="title">extensions</div> + </div> + <svg><use href="#svg-arrow-right"></use></svg> + </a> + <a class="prev-page" href="botcore.utils.caching.html"> + <svg><use href="#svg-arrow-right"></use></svg> + <div class="page-info"> + <div class="context"> + <span>Previous</span> + </div> + + <div class="title">caching</div> + + </div> + </a> + </div> + + <div class="related-information"> + Copyright © 2021, Python Discord | + Created using <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 theme</a>. + | <a class="muted-link" href="../_sources/output/botcore.utils.channel.rst.txt" + rel="nofollow"> + Show Source + </a> + </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.extensions.html b/output/botcore.utils.extensions.html new file mode 100644 index 00000000..a2f4f0d7 --- /dev/null +++ b/output/botcore.utils.extensions.html @@ -0,0 +1,292 @@ +<!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="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.01.02"/> + <title>extensions - Bot Core v1.2.0</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> + <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=df49af52631e7917044a9c21a57f7b83170a6dd0" /> + <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?digest=fade93df149f7c5fedb3ff897f799dc7d283b420" /> + <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 xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" + stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> + <path stroke="none" d="M0 0h24v24H0z" /> + <line x1="4" y1="6" x2="20" y2="6" /> + <line x1="10" y1="12" x2="20" y2="12" /> + <line x1="6" y1="18" x2="20" y2="18" /> + </svg> + </symbol> + <symbol id="svg-menu" viewBox="0 0 24 24"> + <title>Menu</title> + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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 v1.2.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 v1.2.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 current has-children"><a class="reference internal" href="botcore.utils.html">Utils</a><input checked="" 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 class="current"> +<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 current current-page"><a class="current reference internal" href="#">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.regex.html">regex</a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> +</ul> +</li> +</ul> +</li> +</ul> + +</div> +</div> + </div> + + </div> + </aside> + <div class="main"> + <div class="content"> + <div class="article-container"> + <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.utils.extensions"> +<span id="extensions"></span><h1>extensions<a class="headerlink" href="#module-botcore.utils.extensions" title="Permalink to this headline">¶</a></h1> +<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/554919b6314814320f35431a6cfb32ca81b09079/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> +<dd class="field-odd"><p><strong>name</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 module name to unqualify.</p> +</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#str" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p> +</dd> +<dt class="field-odd">Returns</dt> +<dd class="field-odd"><p>The unqualified module name.</p> +</dd> +</dl> +</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/554919b6314814320f35431a6cfb32ca81b09079/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> +<dd class="field-odd"><p><strong>module</strong> (<a class="reference external" href="https://docs.python.org/3/library/types.html#types.ModuleType" title="(in Python v3.10)"><em>types.ModuleType</em></a>) – The module to look for extensions in.</p> +</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#frozenset" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">frozenset</span></code></a>[<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>]</p> +</dd> +<dt class="field-odd">Returns</dt> +<dd class="field-odd"><p>A set of strings that can be passed directly to <a class="reference external" href="https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Bot.load_extension" title="(in discord.py v2.0.0a)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">discord.ext.commands.Bot.load_extension</span></code></a>.</p> +</dd> +</dl> +</dd></dl> +</section> + + </article> + </div> + <footer> + + <div class="related-pages"> + <a class="next-page" href="botcore.utils.logging.html"> + <div class="page-info"> + <div class="context"> + <span>Next</span> + </div> + <div class="title">logging</div> + </div> + <svg><use href="#svg-arrow-right"></use></svg> + </a> + <a class="prev-page" href="botcore.utils.channel.html"> + <svg><use href="#svg-arrow-right"></use></svg> + <div class="page-info"> + <div class="context"> + <span>Previous</span> + </div> + + <div class="title">channel</div> + + </div> + </a> + </div> + + <div class="related-information"> + Copyright © 2021, Python Discord | + Created using <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 theme</a>. + | <a class="muted-link" href="../_sources/output/botcore.utils.extensions.rst.txt" + rel="nofollow"> + Show Source + </a> + </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.html b/output/botcore.utils.html new file mode 100644 index 00000000..4242f3fb --- /dev/null +++ b/output/botcore.utils.html @@ -0,0 +1,293 @@ +<!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="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.01.02"/> + <title>Utils - Bot Core v1.2.0</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> + <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=df49af52631e7917044a9c21a57f7b83170a6dd0" /> + <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?digest=fade93df149f7c5fedb3ff897f799dc7d283b420" /> + <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 xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" + stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> + <path stroke="none" d="M0 0h24v24H0z" /> + <line x1="4" y1="6" x2="20" y2="6" /> + <line x1="10" y1="12" x2="20" y2="12" /> + <line x1="6" y1="18" x2="20" y2="18" /> + </svg> + </symbol> + <symbol id="svg-menu" viewBox="0 0 24 24"> + <title>Menu</title> + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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 v1.2.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" 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 v1.2.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 current has-children current-page"><a class="current reference internal" href="#">Utils</a><input checked="" 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.regex.html">regex</a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> +</ul> +</li> +</ul> +</li> +</ul> + +</div> +</div> + </div> + + </div> + </aside> + <div class="main"> + <div class="content"> + <div class="article-container"> + <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" 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.utils"> +<span id="utils"></span><h1>Utils<a class="headerlink" href="#module-botcore.utils" title="Permalink to this headline">¶</a></h1> +<p>Useful utilities and tools for discord bot development.</p> +<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.utils.caching.html">caching</a></li> +<li class="toctree-l1"><a class="reference internal" href="botcore.utils.channel.html">channel</a></li> +<li class="toctree-l1"><a class="reference internal" href="botcore.utils.extensions.html">extensions</a></li> +<li class="toctree-l1"><a class="reference internal" href="botcore.utils.logging.html">logging</a></li> +<li class="toctree-l1"><a class="reference internal" href="botcore.utils.members.html">members</a></li> +<li class="toctree-l1"><a class="reference internal" href="botcore.utils.regex.html">regex</a></li> +<li class="toctree-l1"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> +</ul> +</div> +</section> +</section> + + </article> + </div> + <footer> + + <div class="related-pages"> + <a class="next-page" href="botcore.utils.caching.html"> + <div class="page-info"> + <div class="context"> + <span>Next</span> + </div> + <div class="title">caching</div> + </div> + <svg><use href="#svg-arrow-right"></use></svg> + </a> + <a class="prev-page" href="botcore.exts.html"> + <svg><use href="#svg-arrow-right"></use></svg> + <div class="page-info"> + <div class="context"> + <span>Previous</span> + </div> + + <div class="title">Exts</div> + + </div> + </a> + </div> + + <div class="related-information"> + Copyright © 2021, Python Discord | + Created using <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 theme</a>. + | <a class="muted-link" href="../_sources/output/botcore.utils.rst.txt" + rel="nofollow"> + Show Source + </a> + </div> + + </footer> + </div> + <aside class="toc-drawer"> + + + <div class="toc-sticky toc-scroll"> + <div class="toc-title-container"> + <span class="toc-title"> + Contents + </span> + </div> + <div class="toc-tree-container"> + <div class="toc-tree"> + <ul> +<li><a class="reference internal" href="#">Utils</a><ul> +<li><a class="reference internal" href="#submodules">Submodules</a></li> +</ul> +</li> +</ul> + + </div> + </div> + </div> + + + </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.logging.html b/output/botcore.utils.logging.html new file mode 100644 index 00000000..53e64514 --- /dev/null +++ b/output/botcore.utils.logging.html @@ -0,0 +1,303 @@ +<!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="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.01.02"/> + <title>logging - Bot Core v1.2.0</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> + <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=df49af52631e7917044a9c21a57f7b83170a6dd0" /> + <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?digest=fade93df149f7c5fedb3ff897f799dc7d283b420" /> + <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 xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" + stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> + <path stroke="none" d="M0 0h24v24H0z" /> + <line x1="4" y1="6" x2="20" y2="6" /> + <line x1="10" y1="12" x2="20" y2="12" /> + <line x1="6" y1="18" x2="20" y2="18" /> + </svg> + </symbol> + <symbol id="svg-menu" viewBox="0 0 24 24"> + <title>Menu</title> + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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 v1.2.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 v1.2.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 current has-children"><a class="reference internal" href="botcore.utils.html">Utils</a><input checked="" 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 class="current"> +<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 current current-page"><a class="current reference internal" href="#">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.regex.html">regex</a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a></li> +</ul> +</li> +</ul> +</li> +</ul> + +</div> +</div> + </div> + + </div> + </aside> + <div class="main"> + <div class="content"> + <div class="article-container"> + <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.utils.logging"> +<span id="logging"></span><h1>logging<a class="headerlink" href="#module-botcore.utils.logging" title="Permalink to this headline">¶</a></h1> +<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/554919b6314814320f35431a6cfb32ca81b09079/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/554919b6314814320f35431a6cfb32ca81b09079/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> +</pre></div> +</div> +<dl class="field-list simple"> +<dt class="field-odd">Parameters</dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>msg</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 message to be logged.</p></li> +<li><p><strong>args</strong> – Passed to the base log function as is.</p></li> +<li><p><strong>kwargs</strong> – Passed to the base log function as is.</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/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> +</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/554919b6314814320f35431a6cfb32ca81b09079/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> +<dd class="field-odd"><p><strong>name</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#str" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]) – The name given to the logger.</p> +</dd> +<dt class="field-even">Return type</dt> +<dd class="field-even"><p><a class="reference internal" href="#botcore.utils.logging.CustomLogger" title="botcore.utils.logging.CustomLogger"><code class="xref py py-class docutils literal notranslate"><span class="pre">CustomLogger</span></code></a></p> +</dd> +<dt class="field-odd">Returns</dt> +<dd class="field-odd"><p>An instance of the <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> class.</p> +</dd> +</dl> +</dd></dl> +</section> + + </article> + </div> + <footer> + + <div class="related-pages"> + <a class="next-page" href="botcore.utils.members.html"> + <div class="page-info"> + <div class="context"> + <span>Next</span> + </div> + <div class="title">members</div> + </div> + <svg><use href="#svg-arrow-right"></use></svg> + </a> + <a class="prev-page" href="botcore.utils.extensions.html"> + <svg><use href="#svg-arrow-right"></use></svg> + <div class="page-info"> + <div class="context"> + <span>Previous</span> + </div> + + <div class="title">extensions</div> + + </div> + </a> + </div> + + <div class="related-information"> + Copyright © 2021, Python Discord | + Created using <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 theme</a>. + | <a class="muted-link" href="../_sources/output/botcore.utils.logging.rst.txt" + rel="nofollow"> + Show Source + </a> + </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.members.html b/output/botcore.utils.members.html new file mode 100644 index 00000000..a332d7e9 --- /dev/null +++ b/output/botcore.utils.members.html @@ -0,0 +1,291 @@ +<!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="next" title="regex" href="botcore.utils.regex.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.01.02"/> + <title>members - Bot Core v1.2.0</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> + <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=df49af52631e7917044a9c21a57f7b83170a6dd0" /> + <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?digest=fade93df149f7c5fedb3ff897f799dc7d283b420" /> + <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 xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" + stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> + <path stroke="none" d="M0 0h24v24H0z" /> + <line x1="4" y1="6" x2="20" y2="6" /> + <line x1="10" y1="12" x2="20" y2="12" /> + <line x1="6" y1="18" x2="20" y2="18" /> + </svg> + </symbol> + <symbol id="svg-menu" viewBox="0 0 24 24"> + <title>Menu</title> + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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 v1.2.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 v1.2.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 current has-children"><a class="reference internal" href="botcore.utils.html">Utils</a><input checked="" 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 class="current"> +<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 current current-page"><a class="current reference internal" href="#">members</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> +</ul> +</li> +</ul> + +</div> +</div> + </div> + + </div> + </aside> + <div class="main"> + <div class="content"> + <div class="article-container"> + <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.utils.members"> +<span id="members"></span><h1>members<a class="headerlink" href="#module-botcore.utils.members" title="Permalink to this headline">¶</a></h1> +<p>Useful helper functions for interactin with <a class="reference external" href="https://discordpy.readthedocs.io/en/master/api.html#discord.Member" title="(in discord.py v2.0.0a)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">discord.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/554919b6314814320f35431a6cfb32ca81b09079/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> +<dd class="field-odd"><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://discordpy.readthedocs.io/en/master/api.html#discord.Member" title="(in discord.py v2.0.0a)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Member</span></code></a>]</p> +</dd> +<dt class="field-even">Returns</dt> +<dd class="field-even"><p>The <a class="reference external" href="https://discordpy.readthedocs.io/en/master/api.html#discord.Member" title="(in discord.py v2.0.0a)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">discord.Member</span></code></a> or <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> to indicate the member could not be found.</p> +</dd> +</dl> +</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/554919b6314814320f35431a6cfb32ca81b09079/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://discordpy.readthedocs.io/en/master/api.html#discord.Member.add_roles" title="(in discord.py v2.0.0a)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">discord.Member.add_roles</span></code></a> and <a class="reference external" href="https://discordpy.readthedocs.io/en/master/api.html#discord.Member.remove_roles" title="(in discord.py v2.0.0a)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">discord.Member.remove_roles</span></code></a>.</p> +<dl class="field-list simple"> +<dt class="field-odd">Parameters</dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>member</strong> (<a class="reference external" href="https://discordpy.readthedocs.io/en/master/api.html#discord.Member" title="(in discord.py v2.0.0a)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Member</span></code></a>) – The member to pass to <code class="docutils literal notranslate"><span class="pre">coro</span></code>.</p></li> +<li><p><strong>coro</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Callable" title="(in Python v3.10)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Callable</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/constants.html#Ellipsis" title="(in Python v3.10)"><code class="xref py py-data docutils literal notranslate"><span class="pre">...</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Coroutine" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Coroutine</span></code></a>]) – This is intended to be <a class="reference external" href="https://discordpy.readthedocs.io/en/master/api.html#discord.Member.add_roles" title="(in discord.py v2.0.0a)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">discord.Member.add_roles</span></code></a> or <a class="reference external" href="https://discordpy.readthedocs.io/en/master/api.html#discord.Member.remove_roles" title="(in discord.py v2.0.0a)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">discord.Member.remove_roles</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/constants.html#None" title="(in Python v3.10)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></a></p> +</dd> +</dl> +</dd></dl> +</section> + + </article> + </div> + <footer> + + <div class="related-pages"> + <a class="next-page" href="botcore.utils.regex.html"> + <div class="page-info"> + <div class="context"> + <span>Next</span> + </div> + <div class="title">regex</div> + </div> + <svg><use href="#svg-arrow-right"></use></svg> + </a> + <a class="prev-page" href="botcore.utils.logging.html"> + <svg><use href="#svg-arrow-right"></use></svg> + <div class="page-info"> + <div class="context"> + <span>Previous</span> + </div> + + <div class="title">logging</div> + + </div> + </a> + </div> + + <div class="related-information"> + Copyright © 2021, Python Discord | + Created using <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 theme</a>. + | <a class="muted-link" href="../_sources/output/botcore.utils.members.rst.txt" + rel="nofollow"> + Show Source + </a> + </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.regex.html b/output/botcore.utils.regex.html index 3eb320d8..2ae4d1df 100644 --- a/output/botcore.regex.html +++ b/output/botcore.utils.regex.html @@ -3,14 +3,13 @@ <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="next" title="Changelog" href="../changelog.html" /><link rel="prev" title="Botcore" href="botcore.html" /> +<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="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.01.02"/> <title>regex - Bot Core v1.2.0</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=df49af52631e7917044a9c21a57f7b83170a6dd0" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?digest=fade93df149f7c5fedb3ff897f799dc7d283b420" /> - <link rel="stylesheet" type="text/css" href="../_static/changelog.css" /> <link rel="stylesheet" type="text/css" href="../_static/logo.css" /> @@ -163,13 +162,19 @@ <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 current current-page"><a class="current reference internal" href="#">regex</a></li> +<li class="toctree-l2"><a class="reference internal" href="botcore.exts.html">Exts</a></li> +<li class="toctree-l2 current has-children"><a class="reference internal" href="botcore.utils.html">Utils</a><input checked="" 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 class="current"> +<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 current current-page"><a class="current reference internal" href="#">regex</a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</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 internal" href="../changelog.html">Changelog</a></li> +</li> </ul> </div> @@ -196,26 +201,26 @@ </label> </div> <article role="main"> - <section id="module-botcore.regex"> -<span id="regex"></span><h1>regex<a class="headerlink" href="#module-botcore.regex" title="Permalink to this headline">¶</a></h1> + <section id="module-botcore.utils.regex"> +<span id="regex"></span><h1>regex<a class="headerlink" href="#module-botcore.utils.regex" title="Permalink to this headline">¶</a></h1> <p>Common regular expressions.</p> <dl class="py data"> -<dt class="sig sig-object py" id="botcore.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/72ec57ae3153a274c902493ef6f74d35c27f965b/botcore/regex.py#L5-L16"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.regex.DISCORD_INVITE" title="Permalink to this definition">¶</a></dt> +<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/554919b6314814320f35431a6cfb32ca81b09079/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.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/72ec57ae3153a274c902493ef6f74d35c27f965b/botcore/regex.py#L23-L31"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.regex.FORMATTED_CODE_REGEX" title="Permalink to this definition">¶</a></dt> +<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/554919b6314814320f35431a6cfb32ca81b09079/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.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/72ec57ae3153a274c902493ef6f74d35c27f965b/botcore/regex.py#L38-L43"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.regex.RAW_CODE_REGEX" title="Permalink to this definition">¶</a></dt> +<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/554919b6314814320f35431a6cfb32ca81b09079/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> @@ -227,23 +232,23 @@ <footer> <div class="related-pages"> - <a class="next-page" href="../changelog.html"> + <a class="next-page" href="botcore.utils.scheduling.html"> <div class="page-info"> <div class="context"> <span>Next</span> </div> - <div class="title">Changelog</div> + <div class="title">scheduling</div> </div> <svg><use href="#svg-arrow-right"></use></svg> </a> - <a class="prev-page" href="botcore.html"> + <a class="prev-page" href="botcore.utils.members.html"> <svg><use href="#svg-arrow-right"></use></svg> <div class="page-info"> <div class="context"> <span>Previous</span> </div> - <div class="title">Botcore</div> + <div class="title">members</div> </div> </a> @@ -253,7 +258,7 @@ Copyright © 2021, Python Discord | Created using <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 theme</a>. - | <a class="muted-link" href="../_sources/output/botcore.regex.rst.txt" + | <a class="muted-link" href="../_sources/output/botcore.utils.regex.rst.txt" rel="nofollow"> Show Source </a> @@ -272,6 +277,5 @@ <script src="../_static/underscore.js"></script> <script src="../_static/doctools.js"></script> <script src="../_static/scripts/furo.js"></script> - <script src="../_static/changelog.js"></script> </body> </html>
\ No newline at end of file diff --git a/output/botcore.utils.scheduling.html b/output/botcore.utils.scheduling.html new file mode 100644 index 00000000..5abe4d17 --- /dev/null +++ b/output/botcore.utils.scheduling.html @@ -0,0 +1,398 @@ +<!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="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.01.02"/> + <title>scheduling - Bot Core v1.2.0</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> + <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=df49af52631e7917044a9c21a57f7b83170a6dd0" /> + <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?digest=fade93df149f7c5fedb3ff897f799dc7d283b420" /> + <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 xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" + stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> + <path stroke="none" d="M0 0h24v24H0z" /> + <line x1="4" y1="6" x2="20" y2="6" /> + <line x1="10" y1="12" x2="20" y2="12" /> + <line x1="6" y1="18" x2="20" y2="18" /> + </svg> + </symbol> + <symbol id="svg-menu" viewBox="0 0 24 24"> + <title>Menu</title> + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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" width="24" height="24" 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 v1.2.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 v1.2.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 current has-children"><a class="reference internal" href="botcore.utils.html">Utils</a><input checked="" 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 class="current"> +<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.regex.html">regex</a></li> +<li class="toctree-l3 current current-page"><a class="current reference internal" href="#">scheduling</a></li> +</ul> +</li> +</ul> +</li> +</ul> + +</div> +</div> + </div> + + </div> + </aside> + <div class="main"> + <div class="content"> + <div class="article-container"> + <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.utils.scheduling"> +<span id="scheduling"></span><h1>scheduling<a class="headerlink" href="#module-botcore.utils.scheduling" title="Permalink to this headline">¶</a></h1> +<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/554919b6314814320f35431a6cfb32ca81b09079/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 +instance’s log messages from other instances. Using the name of the class or module containing +the instance is suggested.</p> +<p>Coroutines can be scheduled immediately with <a class="reference internal" href="#botcore.utils.scheduling.Scheduler.schedule" title="botcore.utils.scheduling.Scheduler.schedule"><code class="xref py py-obj docutils literal notranslate"><span class="pre">schedule</span></code></a> or in the future with <a class="reference internal" href="#botcore.utils.scheduling.Scheduler.schedule_at" title="botcore.utils.scheduling.Scheduler.schedule_at"><code class="xref py py-obj docutils literal notranslate"><span class="pre">schedule_at</span></code></a> +or <a class="reference internal" href="#botcore.utils.scheduling.Scheduler.schedule_later" title="botcore.utils.scheduling.Scheduler.schedule_later"><code class="xref py py-obj docutils literal notranslate"><span class="pre">schedule_later</span></code></a>. A unique ID is required to be given in order to keep track of the +resulting Tasks. Any scheduled task can be cancelled prematurely using <a class="reference internal" href="#botcore.utils.scheduling.Scheduler.cancel" title="botcore.utils.scheduling.Scheduler.cancel"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cancel</span></code></a> by providing +the same ID used to schedule it.</p> +<p>The <code class="docutils literal notranslate"><span class="pre">in</span></code> operator is supported for checking if a task with a given ID is currently scheduled.</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/554919b6314814320f35431a6cfb32ca81b09079/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> +<dd class="field-odd"><p><strong>task_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Hashable" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Hashable</span></code></a>) – The task to look for.</p> +</dd> +<dt class="field-even">Return type</dt> +<dd class="field-even"><p><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></p> +</dd> +<dt class="field-odd">Returns</dt> +<dd class="field-odd"><p><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 the task was found.</p> +</dd> +</dl> +</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/554919b6314814320f35431a6cfb32ca81b09079/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> +<dd class="field-odd"><p><strong>name</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 name of the <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>. Used in logging, and namespacing.</p> +</dd> +</dl> +</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/554919b6314814320f35431a6cfb32ca81b09079/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> +<dd class="field-odd"><p><strong>task_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Hashable" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Hashable</span></code></a>) – The task’s unique ID.</p> +</dd> +<dt class="field-even">Return type</dt> +<dd class="field-even"><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.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/554919b6314814320f35431a6cfb32ca81b09079/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> +<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.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/554919b6314814320f35431a6cfb32ca81b09079/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> +<dl class="field-list simple"> +<dt class="field-odd">Parameters</dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>task_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Hashable" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Hashable</span></code></a>) – A unique ID to create the task with.</p></li> +<li><p><strong>coroutine</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Coroutine" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Coroutine</span></code></a>) – The function to be called.</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/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.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/554919b6314814320f35431a6cfb32ca81b09079/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> +<p>If <code class="docutils literal notranslate"><span class="pre">time</span></code> is in the past, schedule <code class="docutils literal notranslate"><span class="pre">coroutine</span></code> immediately.</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> +<dl class="field-list simple"> +<dt class="field-odd">Parameters</dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>time</strong> (<a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime</span></code></a>) – The time to start the task.</p></li> +<li><p><strong>task_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Hashable" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Hashable</span></code></a>) – A unique ID to create the task with.</p></li> +<li><p><strong>coroutine</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Coroutine" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Coroutine</span></code></a>) – The function to be called.</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/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.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/554919b6314814320f35431a6cfb32ca81b09079/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> +<dl class="field-list simple"> +<dt class="field-odd">Parameters</dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>delay</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Union" title="(in Python v3.10)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></a>]) – How long to wait before starting the task.</p></li> +<li><p><strong>task_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Hashable" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Hashable</span></code></a>) – A unique ID to create the task with.</p></li> +<li><p><strong>coroutine</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Coroutine" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Coroutine</span></code></a>) – The function to be called.</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/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> +</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/554919b6314814320f35431a6cfb32ca81b09079/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> +<dl class="field-list simple"> +<dt class="field-odd">Parameters</dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>coro</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Awaitable" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Awaitable</span></code></a>) – The function to call.</p></li> +<li><p><strong>suppressed_exceptions</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Type" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Type</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/exceptions.html#Exception" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></a>]]) – Exceptions to be handled by the task.</p></li> +<li><p><strong>event_loop</strong> (<a class="reference external" href="https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.AbstractEventLoop" title="(in Python v3.10)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">asyncio.AbstractEventLoop</span></code></a>) – The loop to create the task from.</p></li> +<li><p><strong>kwargs</strong> – Passed to <a class="reference external" href="https://docs.python.org/3/library/asyncio-task.html#asyncio.create_task" title="(in Python v3.10)"><code class="xref py py-func docutils literal notranslate"><span class="pre">asyncio.create_task()</span></code></a>.</p></li> +</ul> +</dd> +<dt class="field-even">Returns</dt> +<dd class="field-even"><p>The wrapped task.</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/asyncio-task.html#asyncio.Task" title="(in Python v3.10)">asyncio.Task</a></p> +</dd> +</dl> +</dd></dl> +</section> + + </article> + </div> + <footer> + + <div class="related-pages"> + + <a class="prev-page" href="botcore.utils.regex.html"> + <svg><use href="#svg-arrow-right"></use></svg> + <div class="page-info"> + <div class="context"> + <span>Previous</span> + </div> + + <div class="title">regex</div> + + </div> + </a> + </div> + + <div class="related-information"> + Copyright © 2021, Python Discord | + Created using <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 theme</a>. + | <a class="muted-link" href="../_sources/output/botcore.utils.scheduling.rst.txt" + rel="nofollow"> + Show Source + </a> + </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/py-modindex.html b/py-modindex.html index ba544d3e..ca66899a 100644 --- a/py-modindex.html +++ b/py-modindex.html @@ -8,7 +8,6 @@ <link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=df49af52631e7917044a9c21a57f7b83170a6dd0" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=fade93df149f7c5fedb3ff897f799dc7d283b420" /> - <link rel="stylesheet" type="text/css" href="_static/changelog.css" /> <link rel="stylesheet" type="text/css" href="_static/logo.css" /> @@ -161,13 +160,19 @@ <p class="caption" role="heading"><span class="caption-text">Modules:</span></p> <ul> <li class="toctree-l1 has-children"><a class="reference internal" href="output/botcore.html">Botcore</a><input 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> -<li class="toctree-l2"><a class="reference internal" href="output/botcore.regex.html">regex</a></li> +<li class="toctree-l2"><a class="reference internal" href="output/botcore.exts.html">Exts</a></li> +<li class="toctree-l2 has-children"><a class="reference internal" href="output/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="output/botcore.utils.caching.html">caching</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.channel.html">channel</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.extensions.html">extensions</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.logging.html">logging</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.members.html">members</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.regex.html">regex</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.scheduling.html">scheduling</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 internal" href="changelog.html">Changelog</a></li> +</li> </ul> </div> @@ -210,13 +215,61 @@ <td><img src="_static/minus.png" class="toggler" id="toggle-1" style="display: none" alt="-" /></td> <td> - <code class="xref">botcore</code></td><td> + <a href="output/botcore.html#module-botcore"><code class="xref">botcore</code></a></td><td> + <em></em></td> + </tr> + <tr class="cg-1"> + <td></td> + <td>    + <a href="output/botcore.exts.html#module-botcore.exts"><code class="xref">botcore.exts</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> + <tr class="cg-1"> + <td></td> + <td>    + <a href="output/botcore.utils.caching.html#module-botcore.utils.caching"><code class="xref">botcore.utils.caching</code></a></td><td> + <em></em></td> + </tr> + <tr class="cg-1"> + <td></td> + <td>    + <a href="output/botcore.utils.channel.html#module-botcore.utils.channel"><code class="xref">botcore.utils.channel</code></a></td><td> + <em></em></td> + </tr> + <tr class="cg-1"> + <td></td> + <td>    + <a href="output/botcore.utils.extensions.html#module-botcore.utils.extensions"><code class="xref">botcore.utils.extensions</code></a></td><td> + <em></em></td> + </tr> + <tr class="cg-1"> + <td></td> + <td>    + <a href="output/botcore.utils.logging.html#module-botcore.utils.logging"><code class="xref">botcore.utils.logging</code></a></td><td> + <em></em></td> + </tr> + <tr class="cg-1"> + <td></td> + <td>    + <a href="output/botcore.utils.members.html#module-botcore.utils.members"><code class="xref">botcore.utils.members</code></a></td><td> + <em></em></td> + </tr> + <tr class="cg-1"> + <td></td> + <td>    + <a href="output/botcore.utils.regex.html#module-botcore.utils.regex"><code class="xref">botcore.utils.regex</code></a></td><td> <em></em></td> </tr> <tr class="cg-1"> <td></td> <td>    - <a href="output/botcore.regex.html#module-botcore.regex"><code class="xref">botcore.regex</code></a></td><td> + <a href="output/botcore.utils.scheduling.html#module-botcore.utils.scheduling"><code class="xref">botcore.utils.scheduling</code></a></td><td> <em></em></td> </tr> </table> @@ -249,6 +302,5 @@ <script src="_static/underscore.js"></script> <script src="_static/doctools.js"></script> <script src="_static/scripts/furo.js"></script> - <script src="_static/changelog.js"></script> </body> </html>
\ No newline at end of file diff --git a/search.html b/search.html index 5f2c2d1c..68b7c7db 100644 --- a/search.html +++ b/search.html @@ -7,7 +7,6 @@ <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.01.02"/><title>Search - Bot Core v1.2.0</title><link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=df49af52631e7917044a9c21a57f7b83170a6dd0" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=fade93df149f7c5fedb3ff897f799dc7d283b420" /> - <link rel="stylesheet" type="text/css" href="_static/changelog.css" /> <link rel="stylesheet" type="text/css" href="_static/logo.css" /> @@ -160,13 +159,19 @@ <p class="caption" role="heading"><span class="caption-text">Modules:</span></p> <ul> <li class="toctree-l1 has-children"><a class="reference internal" href="output/botcore.html">Botcore</a><input 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> -<li class="toctree-l2"><a class="reference internal" href="output/botcore.regex.html">regex</a></li> +<li class="toctree-l2"><a class="reference internal" href="output/botcore.exts.html">Exts</a></li> +<li class="toctree-l2 has-children"><a class="reference internal" href="output/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="output/botcore.utils.caching.html">caching</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.channel.html">channel</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.extensions.html">extensions</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.logging.html">logging</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.members.html">members</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.regex.html">regex</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.utils.scheduling.html">scheduling</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 internal" href="changelog.html">Changelog</a></li> +</li> </ul> </div> @@ -233,7 +238,6 @@ <script src="_static/underscore.js"></script> <script src="_static/doctools.js"></script> <script src="_static/scripts/furo.js"></script> - <script src="_static/changelog.js"></script> <script src="_static/searchtools.js"></script> <script src="_static/language_data.js"></script> diff --git a/searchindex.js b/searchindex.js index 3975ddd7..cb921738 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["changelog","index","output/botcore","output/botcore.regex"],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.todo":2,sphinx:56},filenames:["changelog.rst","index.rst","output/botcore.rst","output/botcore.regex.rst"],objects:{"botcore.regex":[[3,1,1,"","DISCORD_INVITE"],[3,1,1,"","FORMATTED_CODE_REGEX"],[3,1,1,"","RAW_CODE_REGEX"]],botcore:[[3,0,0,"-","regex"]]},objnames:{"0":["py","module","Python module"],"1":["py","data","Python data"]},objtypes:{"0":"py:module","1":"py:data"},terms:{"0":0,"1":0,"12":0,"17th":0,"2":0,"2021":0,"2022":0,"2nd":0,"9th":0,autogener:0,block:[0,3],botcor:1,changelog:1,ci:0,code:[0,3],common:3,core:0,decemb:0,detect:0,discord:3,discord_invit:3,doc:0,express:3,featur:0,format:3,formatted_code_regex:3,index:1,inform:1,invit:3,januari:0,lint:0,novemb:0,packag:0,page:1,poetri:0,raw:3,raw_code_regex:3,regex:[0,1,2],regular:3,s:3,search:1,server:3,sourc:3,support:0,us:3,util:0},titles:["Changelog","Bot Core Project Documentation","Botcore","regex"],titleterms:{bot:1,botcor:2,changelog:0,core:1,document:1,extra:1,modul:1,other:1,project:1,refer:1,regex:3}})
\ No newline at end of file +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.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.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,"-","regex"],[10,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.regex":[[9,4,1,"","DISCORD_INVITE"],[9,4,1,"","FORMATTED_CODE_REGEX"],[9,4,1,"","RAW_CODE_REGEX"]],"botcore.utils.scheduling":[[10,1,1,"","Scheduler"],[10,3,1,"","create_task"]],"botcore.utils.scheduling.Scheduler":[[10,2,1,"","__contains__"],[10,2,1,"","__init__"],[10,2,1,"","cancel"],[10,2,1,"","cancel_all"],[10,2,1,"","schedule"],[10,2,1,"","schedule_at"],[10,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,"class":[4,7,10],"do":5,"float":10,"function":[4,5,7,8,10],"int":[4,5,10],"long":10,"na\u00efv":10,"new":[4,10],"return":[4,5,6,7,8,10],"true":[7,10],A:[4,5,6,10],If:10,The:[4,5,6,7,8,10],To:7,__call__:4,__contains__:10,__init__:[4,10],abstracteventloop:10,ad:7,add_rol:8,after:10,all:10,alreadi:10,an:[4,5,6,7,10],ani:10,api:8,appli:4,ar:4,arg:7,arg_offset:4,argument:[4,7,8],async:[4,5,8],asynccach:4,asyncio:10,attempt:[5,8],await:[8,10],awar:10,base:[4,7,10],befor:10,block:9,bool:[5,10],bot:[1,3,5,6],botcor:0,cach:[1,3,5,8],calcul:10,call:10,callabl:[4,8],can:[6,10],cancel:10,cancel_al:10,categori:5,category_id:5,changelog:0,channel:[1,3],channel_id:5,check:[5,10],clear:4,close:10,code:9,cog:2,command:[5,6],common:[7,9],contain:10,coro:[8,10],coroutin:[4,8,10],could:8,creat:[4,10],create_task:10,current:10,custom:[4,7],customlogg:7,datetim:10,decor:4,delai:10,delet:4,depend:5,develop:[1,3],directli:6,discord:[1,2,3,5,6,8,9],discord_invit:9,distinguish:10,doesn:10,don:10,done:10,elsewher:10,error:8,event:10,event_loop:10,exc_info:7,exce:4,except:[7,10],execut:10,exist:10,expect:8,express:9,ext:[0,1,5,6],extens:[1,3],fail:5,failur:8,fetch:[5,8],fifo:4,forbidden:5,format:9,formatted_code_regex:9,found:[8,10],from:[5,6,8,10],frozenset:6,futur:10,gener:10,get:[5,8],get_logg:7,get_or_fetch_channel:5,get_or_fetch_memb:8,given:[5,6,7,8,10],guild:8,guildchannel:5,handl:[8,10],handle_role_chang:8,hashabl:10,have:[5,7],helper:[5,8],houston:7,how:[4,10],httpexcept:5,id:[5,10],identifi:10,immedi:10,implement:[4,7],index:0,indic:8,inform:[0,7],initi:10,initialis:4,instanc:[4,5,7,10],instanti:10,instead:10,intend:8,interact:5,interactin:8,interest:7,invalid:5,invaliddata:5,invit:9,is_in_categori:5,item:4,keep:10,kei:4,keyword:7,known:10,kwarg:[7,10],level:7,ll:10,load:6,load_extens:6,log:[1,3,10],logger:7,look:[6,10],loop:10,lru:4,mai:4,make:7,mani:4,max_siz:4,maximum:4,member:[1,3],member_id:8,messag:[7,10],method:7,modul:[6,10],moduletyp:6,msg:7,must:10,mypi:7,name:[6,7,10],namespac:10,none:[4,7,8,10],notfound:5,now:10,object:[4,5,8,10],offset:4,onc:4,oper:10,option:[4,7,8],order:[4,10],other:10,otherwis:10,packag:6,page:0,paramet:[4,5,6,7,8,10],pass:[6,7,8,10],past:10,permiss:5,posit:4,prematur:10,prevent:10,problem:7,provid:[4,10],py:5,python:10,qualifi:6,rais:[5,8,10],raw:9,raw_code_regex:9,re:10,receiv:5,recognis:7,regex:[1,3],regular:9,relat:[4,7],remove_rol:8,requir:10,result:10,retriev:5,reusabl:2,role:8,run:10,s:[4,7,9,10],same:10,schedul:[1,3],schedule_at:10,schedule_lat:10,search:0,second:10,server:9,set:6,sever:7,size:4,sole:8,sourc:[4,5,6,7,8,9,10],start:10,store:4,str:[6,7,10],string:6,submodul:[0,1],subpackag:0,subtract:10,suggest:10,support:10,suppressed_except:10,t:10,target:4,task:10,task_id:10,textchannel:5,them:10,thi:[5,8,10],time:10,timezon:10,tool:[1,3],trace:7,track:10,tupl:10,type:[4,5,6,7,8,10],unawait:10,union:10,uniqu:10,unknown:5,unqualifi:6,unschedul:10,us:[1,3,5,7,8,9,10],utc:10,util:[0,1,4,6,7],valu:7,variou:5,wa:[5,10],wait:10,walk_extens:6,warn:10,we:[7,8],when:[4,10],whether:5,which:10,wrap:[4,10],wrapper:10,yield:6,you:5},titles:["Bot Core Project Documentation","Botcore","Exts","Utils","caching","channel","extensions","logging","members","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,project:0,refer:0,regex:9,schedul:10,submodul:3,subpackag:1,util:3}})
\ No newline at end of file |