diff options
Diffstat (limited to 'v8.0.0')
45 files changed, 922 insertions, 337 deletions
diff --git a/v8.0.0/.buildinfo b/v8.0.0/.buildinfo index 952ddec5..cdf0842c 100644 --- a/v8.0.0/.buildinfo +++ b/v8.0.0/.buildinfo @@ -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: f1cfb7e3a098a0c0b1e17ceee8e8ed12 +config: 0ff2557a35dde3db5e493eae903d33cc tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/v8.0.0/.doctrees/changelog.doctree b/v8.0.0/.doctrees/changelog.doctree Binary files differindex 3e18618b..968fa061 100644 --- a/v8.0.0/.doctrees/changelog.doctree +++ b/v8.0.0/.doctrees/changelog.doctree diff --git a/v8.0.0/.doctrees/development.doctree b/v8.0.0/.doctrees/development.doctree Binary files differindex f334a220..97d8a442 100644 --- a/v8.0.0/.doctrees/development.doctree +++ b/v8.0.0/.doctrees/development.doctree diff --git a/v8.0.0/.doctrees/environment.pickle b/v8.0.0/.doctrees/environment.pickle Binary files differindex 692fe60b..238c448d 100644 --- a/v8.0.0/.doctrees/environment.pickle +++ b/v8.0.0/.doctrees/environment.pickle diff --git a/v8.0.0/.doctrees/index.doctree b/v8.0.0/.doctrees/index.doctree Binary files differindex 3fbb1ad1..843c7979 100644 --- a/v8.0.0/.doctrees/index.doctree +++ b/v8.0.0/.doctrees/index.doctree diff --git a/v8.0.0/.doctrees/output/botcore.async_stats.doctree b/v8.0.0/.doctrees/output/botcore.async_stats.doctree Binary files differindex 9ce61154..c16eff77 100644 --- a/v8.0.0/.doctrees/output/botcore.async_stats.doctree +++ b/v8.0.0/.doctrees/output/botcore.async_stats.doctree diff --git a/v8.0.0/.doctrees/output/botcore.doctree b/v8.0.0/.doctrees/output/botcore.doctree Binary files differindex 9c31baaf..b41e53ed 100644 --- a/v8.0.0/.doctrees/output/botcore.doctree +++ b/v8.0.0/.doctrees/output/botcore.doctree diff --git a/v8.0.0/.doctrees/output/botcore.exts.doctree b/v8.0.0/.doctrees/output/botcore.exts.doctree Binary files differindex 1e40ada0..b80c6e7e 100644 --- a/v8.0.0/.doctrees/output/botcore.exts.doctree +++ b/v8.0.0/.doctrees/output/botcore.exts.doctree diff --git a/v8.0.0/.doctrees/output/botcore.site_api.doctree b/v8.0.0/.doctrees/output/botcore.site_api.doctree Binary files differindex 73a31b6d..6c239a93 100644 --- a/v8.0.0/.doctrees/output/botcore.site_api.doctree +++ b/v8.0.0/.doctrees/output/botcore.site_api.doctree diff --git a/v8.0.0/.doctrees/output/botcore.utils.caching.doctree b/v8.0.0/.doctrees/output/botcore.utils.caching.doctree Binary files differindex dd446e56..3eeda7a9 100644 --- a/v8.0.0/.doctrees/output/botcore.utils.caching.doctree +++ b/v8.0.0/.doctrees/output/botcore.utils.caching.doctree diff --git a/v8.0.0/.doctrees/output/botcore.utils.channel.doctree b/v8.0.0/.doctrees/output/botcore.utils.channel.doctree Binary files differindex 1b1a208d..0403de97 100644 --- a/v8.0.0/.doctrees/output/botcore.utils.channel.doctree +++ b/v8.0.0/.doctrees/output/botcore.utils.channel.doctree diff --git a/v8.0.0/.doctrees/output/botcore.utils.commands.doctree b/v8.0.0/.doctrees/output/botcore.utils.commands.doctree Binary files differindex 47f45f6f..3da59581 100644 --- a/v8.0.0/.doctrees/output/botcore.utils.commands.doctree +++ b/v8.0.0/.doctrees/output/botcore.utils.commands.doctree diff --git a/v8.0.0/.doctrees/output/botcore.utils.doctree b/v8.0.0/.doctrees/output/botcore.utils.doctree Binary files differindex 1c8c36c3..fd322044 100644 --- a/v8.0.0/.doctrees/output/botcore.utils.doctree +++ b/v8.0.0/.doctrees/output/botcore.utils.doctree diff --git a/v8.0.0/.doctrees/output/botcore.utils.interactions.doctree b/v8.0.0/.doctrees/output/botcore.utils.interactions.doctree Binary files differindex 98d524a1..371f8318 100644 --- a/v8.0.0/.doctrees/output/botcore.utils.interactions.doctree +++ b/v8.0.0/.doctrees/output/botcore.utils.interactions.doctree diff --git a/v8.0.0/.doctrees/output/botcore.utils.logging.doctree b/v8.0.0/.doctrees/output/botcore.utils.logging.doctree Binary files differindex 6881b948..80da461d 100644 --- a/v8.0.0/.doctrees/output/botcore.utils.logging.doctree +++ b/v8.0.0/.doctrees/output/botcore.utils.logging.doctree diff --git a/v8.0.0/.doctrees/output/botcore.utils.members.doctree b/v8.0.0/.doctrees/output/botcore.utils.members.doctree Binary files differindex 7b241bbb..af05d815 100644 --- a/v8.0.0/.doctrees/output/botcore.utils.members.doctree +++ b/v8.0.0/.doctrees/output/botcore.utils.members.doctree diff --git a/v8.0.0/.doctrees/output/botcore.utils.regex.doctree b/v8.0.0/.doctrees/output/botcore.utils.regex.doctree Binary files differindex 9afafa48..5b15102d 100644 --- a/v8.0.0/.doctrees/output/botcore.utils.regex.doctree +++ b/v8.0.0/.doctrees/output/botcore.utils.regex.doctree diff --git a/v8.0.0/.doctrees/output/botcore.utils.scheduling.doctree b/v8.0.0/.doctrees/output/botcore.utils.scheduling.doctree Binary files differindex 781790de..c202f140 100644 --- a/v8.0.0/.doctrees/output/botcore.utils.scheduling.doctree +++ b/v8.0.0/.doctrees/output/botcore.utils.scheduling.doctree diff --git a/v8.0.0/_static/basic.css b/v8.0.0/_static/basic.css index 4e9a9f1f..eeb0519a 100644 --- a/v8.0.0/_static/basic.css +++ b/v8.0.0/_static/basic.css @@ -236,6 +236,16 @@ div.body p, div.body dd, div.body li, div.body blockquote { a.headerlink { visibility: hidden; } +a.brackets:before, +span.brackets > a:before{ + content: "["; +} + +a.brackets:after, +span.brackets > a:after { + content: "]"; +} + h1:hover > a.headerlink, h2:hover > a.headerlink, @@ -324,15 +334,11 @@ aside.sidebar { p.sidebar-title { font-weight: bold; } -nav.contents, -aside.topic, div.admonition, div.topic, blockquote { clear: left; } /* -- topics ---------------------------------------------------------------- */ -nav.contents, -aside.topic, div.topic { border: 1px solid #ccc; padding: 7px; @@ -371,8 +377,6 @@ div.body p.centered { div.sidebar > :last-child, aside.sidebar > :last-child, -nav.contents > :last-child, -aside.topic > :last-child, div.topic > :last-child, div.admonition > :last-child { margin-bottom: 0; @@ -380,8 +384,6 @@ div.admonition > :last-child { div.sidebar::after, aside.sidebar::after, -nav.contents::after, -aside.topic::after, div.topic::after, div.admonition::after, blockquote::after { @@ -606,26 +608,19 @@ ol.simple p, ul.simple p { margin-bottom: 0; } -aside.footnote > span, -div.citation > span { +dl.footnote > dt, +dl.citation > dt { float: left; + margin-right: 0.5em; } -aside.footnote > span:last-of-type, -div.citation > span:last-of-type { - padding-right: 0.5em; -} -aside.footnote > p { - margin-left: 2em; -} -div.citation > p { - margin-left: 4em; -} -aside.footnote > p:last-of-type, -div.citation > p:last-of-type { + +dl.footnote > dd, +dl.citation > dd { margin-bottom: 0em; } -aside.footnote > p:last-of-type:after, -div.citation > p:last-of-type:after { + +dl.footnote > dd:after, +dl.citation > dd:after { content: ""; clear: both; } @@ -641,6 +636,10 @@ dl.field-list > dt { padding-left: 0.5em; padding-right: 5px; } +dl.field-list > dt:after { + content: ":"; +} + dl.field-list > dd { padding-left: 0.5em; diff --git a/v8.0.0/_static/doctools.js b/v8.0.0/_static/doctools.js index c3db08d1..527b876c 100644 --- a/v8.0.0/_static/doctools.js +++ b/v8.0.0/_static/doctools.js @@ -10,6 +10,13 @@ */ "use strict"; +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + const _ready = (callback) => { if (document.readyState !== "loading") { callback(); @@ -19,72 +26,10 @@ const _ready = (callback) => { }; /** - * highlight a given string on a node by wrapping it in - * span elements with the given class name. - */ -const _highlight = (node, addItems, text, className) => { - if (node.nodeType === Node.TEXT_NODE) { - const val = node.nodeValue; - const parent = node.parentNode; - const pos = val.toLowerCase().indexOf(text); - if ( - pos >= 0 && - !parent.classList.contains(className) && - !parent.classList.contains("nohighlight") - ) { - let span; - - const closestNode = parent.closest("body, svg, foreignObject"); - const isInSVG = closestNode && closestNode.matches("svg"); - if (isInSVG) { - span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - } else { - span = document.createElement("span"); - span.classList.add(className); - } - - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - parent.insertBefore( - span, - parent.insertBefore( - document.createTextNode(val.substr(pos + text.length)), - node.nextSibling - ) - ); - node.nodeValue = val.substr(0, pos); - - if (isInSVG) { - const rect = document.createElementNS( - "http://www.w3.org/2000/svg", - "rect" - ); - const bbox = parent.getBBox(); - rect.x.baseVal.value = bbox.x; - rect.y.baseVal.value = bbox.y; - rect.width.baseVal.value = bbox.width; - rect.height.baseVal.value = bbox.height; - rect.setAttribute("class", className); - addItems.push({ parent: parent, target: rect }); - } - } - } else if (node.matches && !node.matches("button, select, textarea")) { - node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); - } -}; -const _highlightText = (thisNode, text, className) => { - let addItems = []; - _highlight(thisNode, addItems, text, className); - addItems.forEach((obj) => - obj.parent.insertAdjacentElement("beforebegin", obj.target) - ); -}; - -/** * Small JavaScript module for the documentation. */ const Documentation = { init: () => { - Documentation.highlightSearchWords(); Documentation.initDomainIndexTable(); Documentation.initOnKeyListeners(); }, @@ -127,51 +72,6 @@ const Documentation = { }, /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords: () => { - const highlight = - new URLSearchParams(window.location.search).get("highlight") || ""; - const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); - if (terms.length === 0) return; // nothing to do - - // There should never be more than one element matching "div.body" - const divBody = document.querySelectorAll("div.body"); - const body = divBody.length ? divBody[0] : document.querySelector("body"); - window.setTimeout(() => { - terms.forEach((term) => _highlightText(body, term, "highlighted")); - }, 10); - - const searchBox = document.getElementById("searchbox"); - if (searchBox === null) return; - searchBox.appendChild( - document - .createRange() - .createContextualFragment( - '<p class="highlight-link">' + - '<a href="javascript:Documentation.hideSearchWords()">' + - Documentation.gettext("Hide Search Matches") + - "</a></p>" - ) - ); - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords: () => { - document - .querySelectorAll("#searchbox .highlight-link") - .forEach((el) => el.remove()); - document - .querySelectorAll("span.highlighted") - .forEach((el) => el.classList.remove("highlighted")); - const url = new URL(window.location); - url.searchParams.delete("highlight"); - window.history.replaceState({}, "", url); - }, - - /** * helper function to focus on search bar */ focusSearchBar: () => { @@ -210,15 +110,11 @@ const Documentation = { ) return; - const blacklistedElements = new Set([ - "TEXTAREA", - "INPUT", - "SELECT", - "BUTTON", - ]); document.addEventListener("keydown", (event) => { - if (blacklistedElements.has(document.activeElement.tagName)) return; // bail for input elements - if (event.altKey || event.ctrlKey || event.metaKey) return; // bail with special keys + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; if (!event.shiftKey) { switch (event.key) { @@ -240,10 +136,6 @@ const Documentation = { event.preventDefault(); } break; - case "Escape": - if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; - Documentation.hideSearchWords(); - event.preventDefault(); } } diff --git a/v8.0.0/_static/pygments.css b/v8.0.0/_static/pygments.css index 75471509..053cfd3d 100644 --- a/v8.0.0/_static/pygments.css +++ b/v8.0.0/_static/pygments.css @@ -54,7 +54,6 @@ .highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #000000 } /* Name.Variable */ .highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */ -.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */ .highlight .w { color: #f8f8f8 } /* Text.Whitespace */ .highlight .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */ @@ -139,7 +138,6 @@ body[data-theme="dark"] .highlight .py { color: #d0d0d0 } /* Name.Property */ body[data-theme="dark"] .highlight .nt { color: #6ebf26; font-weight: bold } /* Name.Tag */ body[data-theme="dark"] .highlight .nv { color: #40ffff } /* Name.Variable */ body[data-theme="dark"] .highlight .ow { color: #6ebf26; font-weight: bold } /* Operator.Word */ -body[data-theme="dark"] .highlight .pm { color: #d0d0d0 } /* Punctuation.Marker */ body[data-theme="dark"] .highlight .w { color: #666666 } /* Text.Whitespace */ body[data-theme="dark"] .highlight .mb { color: #51b2fd } /* Literal.Number.Bin */ body[data-theme="dark"] .highlight .mf { color: #51b2fd } /* Literal.Number.Float */ @@ -224,7 +222,6 @@ body:not([data-theme="light"]) .highlight .py { color: #d0d0d0 } /* Name.Propert body:not([data-theme="light"]) .highlight .nt { color: #6ebf26; font-weight: bold } /* Name.Tag */ body:not([data-theme="light"]) .highlight .nv { color: #40ffff } /* Name.Variable */ body:not([data-theme="light"]) .highlight .ow { color: #6ebf26; font-weight: bold } /* Operator.Word */ -body:not([data-theme="light"]) .highlight .pm { color: #d0d0d0 } /* Punctuation.Marker */ body:not([data-theme="light"]) .highlight .w { color: #666666 } /* Text.Whitespace */ body:not([data-theme="light"]) .highlight .mb { color: #51b2fd } /* Literal.Number.Bin */ body:not([data-theme="light"]) .highlight .mf { color: #51b2fd } /* Literal.Number.Float */ diff --git a/v8.0.0/_static/searchtools.js b/v8.0.0/_static/searchtools.js index f2fb7d5c..e89e34d4 100644 --- a/v8.0.0/_static/searchtools.js +++ b/v8.0.0/_static/searchtools.js @@ -57,14 +57,14 @@ const _removeChildren = (element) => { const _escapeRegExp = (string) => string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string -const _displayItem = (item, highlightTerms, searchTerms) => { +const _displayItem = (item, searchTerms) => { const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; - const [docName, title, anchor, descr] = item; + const [docName, title, anchor, descr, score, _filename] = item; let listItem = document.createElement("li"); let requestUrl; @@ -82,10 +82,9 @@ const _displayItem = (item, highlightTerms, searchTerms) => { requestUrl = docUrlRoot + docName + docFileSuffix; linkUrl = docName + docLinkSuffix; } - const params = new URLSearchParams(); - params.set("highlight", [...highlightTerms].join(" ")); let linkEl = listItem.appendChild(document.createElement("a")); - linkEl.href = linkUrl + "?" + params.toString() + anchor; + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; linkEl.innerHTML = title; if (descr) listItem.appendChild(document.createElement("span")).innerHTML = @@ -96,7 +95,7 @@ const _displayItem = (item, highlightTerms, searchTerms) => { .then((data) => { if (data) listItem.appendChild( - Search.makeSearchSummary(data, searchTerms, highlightTerms) + Search.makeSearchSummary(data, searchTerms) ); }); Search.output.appendChild(listItem); @@ -116,15 +115,14 @@ const _finishSearch = (resultCount) => { const _displayNextItem = ( results, resultCount, - highlightTerms, searchTerms ) => { // results left, load the summary and display it // this is intended to be dynamic (don't sub resultsCount) if (results.length) { - _displayItem(results.pop(), highlightTerms, searchTerms); + _displayItem(results.pop(), searchTerms); setTimeout( - () => _displayNextItem(results, resultCount, highlightTerms, searchTerms), + () => _displayNextItem(results, resultCount, searchTerms), 5 ); } @@ -237,6 +235,12 @@ const Search = { * execute search (requires search index to be loaded) */ query: (query) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + // stem the search terms and add them to the correct list const stemmer = new Stemmer(); const searchTerms = new Set(); @@ -264,6 +268,10 @@ const Search = { } }); + if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js + localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) + } + // console.debug("SEARCH: searching for:"); // console.info("required: ", [...searchTerms]); // console.info("excluded: ", [...excludedTerms]); @@ -272,6 +280,40 @@ const Search = { let results = []; _removeChildren(document.getElementById("search-progress")); + const queryLower = query.toLowerCase(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) { + for (const [file, id] of foundTitles) { + let score = Math.round(100 * queryLower.length / title.length) + results.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // search for explicit entries in index directives + for (const [entry, foundEntries] of Object.entries(indexEntries)) { + if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { + for (const [file, id] of foundEntries) { + let score = Math.round(100 * queryLower.length / entry.length) + results.push([ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + // lookup as object objectTerms.forEach((term) => results.push(...Search.performObjectSearch(term, objectTerms)) @@ -318,7 +360,7 @@ const Search = { // console.info("search results:", Search.lastresults); // print the results - _displayNextItem(results, results.length, highlightTerms, searchTerms); + _displayNextItem(results, results.length, searchTerms); }, /** @@ -399,8 +441,8 @@ const Search = { // prepare search const terms = Search._index.terms; const titleTerms = Search._index.titleterms; - const docNames = Search._index.docnames; const filenames = Search._index.filenames; + const docNames = Search._index.docnames; const titles = Search._index.titles; const scoreMap = new Map(); @@ -497,11 +539,9 @@ const Search = { /** * helper function to return a node containing the * search summary for a given text. keywords is a list - * of stemmed words, highlightWords is the list of normal, unstemmed - * words. the first one is used to find the occurrence, the - * latter for highlighting it. + * of stemmed words. */ - makeSearchSummary: (htmlText, keywords, highlightWords) => { + makeSearchSummary: (htmlText, keywords) => { const text = Search.htmlToText(htmlText); if (text === "") return null; @@ -519,10 +559,6 @@ const Search = { summary.classList.add("context"); summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; - highlightWords.forEach((highlightWord) => - _highlightText(summary, highlightWord, "highlighted") - ); - return summary; }, }; diff --git a/v8.0.0/_static/sphinx_highlight.js b/v8.0.0/_static/sphinx_highlight.js new file mode 100644 index 00000000..aae669d7 --- /dev/null +++ b/v8.0.0/_static/sphinx_highlight.js @@ -0,0 +1,144 @@ +/* Highlighting utilities for Sphinx HTML documentation. */ +"use strict"; + +const SPHINX_HIGHLIGHT_ENABLED = true + +/** + * highlight a given string on a node by wrapping it in + * span elements with the given class name. + */ +const _highlight = (node, addItems, text, className) => { + if (node.nodeType === Node.TEXT_NODE) { + const val = node.nodeValue; + const parent = node.parentNode; + const pos = val.toLowerCase().indexOf(text); + if ( + pos >= 0 && + !parent.classList.contains(className) && + !parent.classList.contains("nohighlight") + ) { + let span; + + const closestNode = parent.closest("body, svg, foreignObject"); + const isInSVG = closestNode && closestNode.matches("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.classList.add(className); + } + + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + parent.insertBefore( + span, + parent.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling + ) + ); + node.nodeValue = val.substr(0, pos); + + if (isInSVG) { + const rect = document.createElementNS( + "http://www.w3.org/2000/svg", + "rect" + ); + const bbox = parent.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute("class", className); + addItems.push({ parent: parent, target: rect }); + } + } + } else if (node.matches && !node.matches("button, select, textarea")) { + node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); + } +}; +const _highlightText = (thisNode, text, className) => { + let addItems = []; + _highlight(thisNode, addItems, text, className); + addItems.forEach((obj) => + obj.parent.insertAdjacentElement("beforebegin", obj.target) + ); +}; + +/** + * Small JavaScript module for the documentation. + */ +const SphinxHighlight = { + + /** + * highlight the search words provided in localstorage in the text + */ + highlightSearchWords: () => { + if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight + + // get and clear terms from localstorage + const url = new URL(window.location); + const highlight = + localStorage.getItem("sphinx_highlight_terms") + || url.searchParams.get("highlight") + || ""; + localStorage.removeItem("sphinx_highlight_terms") + url.searchParams.delete("highlight"); + window.history.replaceState({}, "", url); + + // get individual terms from highlight string + const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); + if (terms.length === 0) return; // nothing to do + + // There should never be more than one element matching "div.body" + const divBody = document.querySelectorAll("div.body"); + const body = divBody.length ? divBody[0] : document.querySelector("body"); + window.setTimeout(() => { + terms.forEach((term) => _highlightText(body, term, "highlighted")); + }, 10); + + const searchBox = document.getElementById("searchbox"); + if (searchBox === null) return; + searchBox.appendChild( + document + .createRange() + .createContextualFragment( + '<p class="highlight-link">' + + '<a href="javascript:SphinxHighlight.hideSearchWords()">' + + _("Hide Search Matches") + + "</a></p>" + ) + ); + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + localStorage.removeItem("sphinx_highlight_terms") + }, + + initEscapeListener: () => { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; + if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { + SphinxHighlight.hideSearchWords(); + event.preventDefault(); + } + }); + }, +}; + +_ready(SphinxHighlight.highlightSearchWords); +_ready(SphinxHighlight.initEscapeListener); diff --git a/v8.0.0/changelog.html b/v8.0.0/changelog.html index a8207f92..e91a5ee1 100644 --- a/v8.0.0/changelog.html +++ b/v8.0.0/changelog.html @@ -2,10 +2,10 @@ <html class="no-js" lang="en"> <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.19: https://docutils.sourceforge.io/" /> + <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="Local Development & Testing" href="development.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-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>Changelog - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> @@ -208,6 +208,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../v8.2.1/changelog.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../v8.2.0/changelog.html">v8.2.0</a> </li> @@ -584,6 +588,7 @@ <script src="_static/underscore.js"></script> <script src="_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="_static/doctools.js"></script> + <script src="_static/sphinx_highlight.js"></script> <script src="_static/scripts/furo.js"></script> <script src="_static/changelog.js"></script> </body> diff --git a/v8.0.0/development.html b/v8.0.0/development.html index 42deb3bc..6f93821b 100644 --- a/v8.0.0/development.html +++ b/v8.0.0/development.html @@ -2,10 +2,10 @@ <html class="no-js" lang="en"> <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.19: https://docutils.sourceforge.io/" /> + <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="site_api" href="output/botcore.site_api.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-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>Local Development & Testing - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> @@ -208,6 +208,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../v8.2.1/development.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../v8.2.0/development.html">v8.2.0</a> </li> @@ -468,6 +472,7 @@ to help you test out certain features. Use them as needed.</p> <script src="_static/underscore.js"></script> <script src="_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="_static/doctools.js"></script> + <script src="_static/sphinx_highlight.js"></script> <script src="_static/scripts/furo.js"></script> <script src="_static/changelog.js"></script> </body> diff --git a/v8.0.0/genindex.html b/v8.0.0/genindex.html index 791134e7..397a82eb 100644 --- a/v8.0.0/genindex.html +++ b/v8.0.0/genindex.html @@ -4,7 +4,7 @@ <meta name="viewport" content="width=device-width,initial-scale=1"/> <meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="#" /><link rel="search" title="Search" href="search.html" /> - <link rel="shortcut icon" href="https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_full/logo_full.min.svg"/><meta name="generator" content="sphinx-5.1.1, furo 2022.09.15"/><title>Index - Bot Core v8.0.0</title> + <link rel="shortcut icon" href="https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_full/logo_full.min.svg"/><meta name="generator" content="sphinx-5.2.2, furo 2022.09.15"/><title>Index - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" /> @@ -206,6 +206,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../v8.2.1/index.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../v8.2.0/index.html">v8.2.0</a> </li> @@ -809,6 +813,7 @@ <script src="_static/underscore.js"></script> <script src="_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="_static/doctools.js"></script> + <script src="_static/sphinx_highlight.js"></script> <script src="_static/scripts/furo.js"></script> <script src="_static/changelog.js"></script> </body> diff --git a/v8.0.0/index.html b/v8.0.0/index.html index 109b0781..c04d0e93 100644 --- a/v8.0.0/index.html +++ b/v8.0.0/index.html @@ -2,10 +2,10 @@ <html class="no-js" lang="en"> <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.19: https://docutils.sourceforge.io/" /> + <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="Botcore" href="output/botcore.html" /> - <link rel="shortcut icon" href="https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_full/logo_full.min.svg"/><meta name="generator" content="sphinx-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> @@ -208,6 +208,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../v8.2.1/index.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../v8.2.0/index.html">v8.2.0</a> </li> @@ -342,17 +346,46 @@ <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.html#botcore.BotBase"><code class="docutils literal notranslate"><span class="pre">BotBase</span></code></a><ul> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.html#botcore.BotBase.__init__"><code class="docutils literal notranslate"><span class="pre">BotBase.__init__()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.html#botcore.BotBase.add_cog"><code class="docutils literal notranslate"><span class="pre">BotBase.add_cog()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.html#botcore.BotBase.add_command"><code class="docutils literal notranslate"><span class="pre">BotBase.add_command()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.html#botcore.BotBase.clear"><code class="docutils literal notranslate"><span class="pre">BotBase.clear()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.html#botcore.BotBase.close"><code class="docutils literal notranslate"><span class="pre">BotBase.close()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.html#botcore.BotBase.load_extensions"><code class="docutils literal notranslate"><span class="pre">BotBase.load_extensions()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.html#botcore.BotBase.log_to_dev_log"><code class="docutils literal notranslate"><span class="pre">BotBase.log_to_dev_log()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.html#botcore.BotBase.on_guild_available"><code class="docutils literal notranslate"><span class="pre">BotBase.on_guild_available()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.html#botcore.BotBase.on_guild_unavailable"><code class="docutils literal notranslate"><span class="pre">BotBase.on_guild_unavailable()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.html#botcore.BotBase.ping_services"><code class="docutils literal notranslate"><span class="pre">BotBase.ping_services()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.html#botcore.BotBase.remove_command"><code class="docutils literal notranslate"><span class="pre">BotBase.remove_command()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.html#botcore.BotBase.setup_hook"><code class="docutils literal notranslate"><span class="pre">BotBase.setup_hook()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.html#botcore.BotBase.wait_until_guild_available"><code class="docutils literal notranslate"><span class="pre">BotBase.wait_until_guild_available()</span></code></a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="output/botcore.html#botcore.StartupError"><code class="docutils literal notranslate"><span class="pre">StartupError</span></code></a><ul> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.html#botcore.StartupError.__init__"><code class="docutils literal notranslate"><span class="pre">StartupError.__init__()</span></code></a></li> +</ul> +</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#botcore.utils.apply_monkey_patches"><code class="docutils literal notranslate"><span class="pre">apply_monkey_patches()</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="output/botcore.utils.html#botcore.utils.unqualify"><code class="docutils literal notranslate"><span class="pre">unqualify()</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="output/botcore.utils.html#submodules">Submodules</a></li> </ul> </li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="output/botcore.html#submodules">Submodules</a><ul> -<li class="toctree-l3"><a class="reference internal" href="output/botcore.async_stats.html">async_stats</a></li> -<li class="toctree-l3"><a class="reference internal" href="output/botcore.site_api.html">site_api</a></li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.async_stats.html">async_stats</a><ul> +<li class="toctree-l4"><a class="reference internal" href="output/botcore.async_stats.html#botcore.async_stats.AsyncStatsClient"><code class="docutils literal notranslate"><span class="pre">AsyncStatsClient</span></code></a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="output/botcore.site_api.html">site_api</a><ul> +<li class="toctree-l4"><a class="reference internal" href="output/botcore.site_api.html#botcore.site_api.APIClient"><code class="docutils literal notranslate"><span class="pre">APIClient</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="output/botcore.site_api.html#botcore.site_api.ResponseCodeError"><code class="docutils literal notranslate"><span class="pre">ResponseCodeError</span></code></a></li> +</ul> +</li> </ul> </li> </ul> @@ -419,6 +452,7 @@ <script src="_static/underscore.js"></script> <script src="_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="_static/doctools.js"></script> + <script src="_static/sphinx_highlight.js"></script> <script src="_static/scripts/furo.js"></script> <script src="_static/changelog.js"></script> </body> diff --git a/v8.0.0/index_redirect.html b/v8.0.0/index_redirect.html index 4b9e0917..9a9c5c47 100644 --- a/v8.0.0/index_redirect.html +++ b/v8.0.0/index_redirect.html @@ -7,7 +7,7 @@ <meta name="viewport" content="width=device-width,initial-scale=1"/> <meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /> - <link rel="shortcut icon" href="https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_full/logo_full.min.svg"/><meta name="generator" content="sphinx-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="_static/pygments.css" /> @@ -59,6 +59,7 @@ <script src="_static/underscore.js"></script> <script src="_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="_static/doctools.js"></script> + <script src="_static/sphinx_highlight.js"></script> <script src="_static/scripts/furo.js"></script> <script src="_static/changelog.js"></script> </body> diff --git a/v8.0.0/output/botcore.async_stats.html b/v8.0.0/output/botcore.async_stats.html index baf1ddcf..feee04cd 100644 --- a/v8.0.0/output/botcore.async_stats.html +++ b/v8.0.0/output/botcore.async_stats.html @@ -2,10 +2,10 @@ <html class="no-js" lang="en"> <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.19: https://docutils.sourceforge.io/" /> + <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="site_api" href="botcore.site_api.html" /><link rel="prev" title="scheduling" href="botcore.utils.scheduling.html" /> - <link rel="shortcut icon" href="https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_full/logo_full.min.svg"/><meta name="generator" content="sphinx-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>async_stats - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> @@ -138,7 +138,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> @@ -208,6 +208,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../../v8.2.1/output/botcore.async_stats.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../../v8.2.0/output/botcore.async_stats.html">v8.2.0</a> </li> @@ -327,7 +331,7 @@ <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> @@ -346,7 +350,7 @@ <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">loop</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">host</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'localhost'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">8125</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefix</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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/async_stats.py#L15-L39"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.async_stats.AsyncStatsClient.__init__" title="Permalink to this definition">#</a></dt> <dd><p>Create a new <a class="reference internal" href="#botcore.async_stats.AsyncStatsClient" title="botcore.async_stats.AsyncStatsClient"><code class="xref py py-obj docutils literal notranslate"><span class="pre">AsyncStatsClient</span></code></a>.</p> <dl class="field-list simple"> -<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>loop</strong> (<a class="reference external" href="https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.AbstractEventLoop" title="(in Python v3.10)"><em>asyncio.AbstractEventLoop</em></a>) – The event loop to use when creating the <a class="reference external" href="https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.create_datagram_endpoint" title="(in Python v3.10)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">asyncio.loop.create_datagram_endpoint</span></code></a>.</p></li> @@ -363,7 +367,7 @@ <em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">create_socket</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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/async_stats.py#L40-L47"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.async_stats.AsyncStatsClient.create_socket" title="Permalink to this definition">#</a></dt> <dd><p>Use <a class="reference external" href="https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.create_datagram_endpoint" title="(in Python v3.10)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">asyncio.loop.create_datagram_endpoint</span></code></a> from the loop given on init to create a socket.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -418,8 +422,31 @@ </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"> + On this page + </span> + </div> + <div class="toc-tree-container"> + <div class="toc-tree"> + <ul> +<li><a class="reference internal" href="#">async_stats</a><ul> +<li><a class="reference internal" href="#botcore.async_stats.AsyncStatsClient"><code class="docutils literal notranslate"><span class="pre">AsyncStatsClient</span></code></a><ul> +<li><a class="reference internal" href="#botcore.async_stats.AsyncStatsClient.__init__"><code class="docutils literal notranslate"><span class="pre">AsyncStatsClient.__init__()</span></code></a></li> +<li><a class="reference internal" href="#botcore.async_stats.AsyncStatsClient.create_socket"><code class="docutils literal notranslate"><span class="pre">AsyncStatsClient.create_socket()</span></code></a></li> +</ul> +</li> +</ul> +</li> +</ul> + + </div> + </div> + </div> </aside> @@ -429,6 +456,7 @@ <script src="../_static/underscore.js"></script> <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="../_static/doctools.js"></script> + <script src="../_static/sphinx_highlight.js"></script> <script src="../_static/scripts/furo.js"></script> <script src="../_static/changelog.js"></script> </body> diff --git a/v8.0.0/output/botcore.exts.html b/v8.0.0/output/botcore.exts.html index a758fcb8..881ce6d6 100644 --- a/v8.0.0/output/botcore.exts.html +++ b/v8.0.0/output/botcore.exts.html @@ -2,10 +2,10 @@ <html class="no-js" lang="en"> <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.19: https://docutils.sourceforge.io/" /> + <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="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-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>Exts - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> @@ -208,6 +208,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../../v8.2.1/output/botcore.exts.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../../v8.2.0/output/botcore.exts.html">v8.2.0</a> </li> @@ -394,6 +398,7 @@ <script src="../_static/underscore.js"></script> <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="../_static/doctools.js"></script> + <script src="../_static/sphinx_highlight.js"></script> <script src="../_static/scripts/furo.js"></script> <script src="../_static/changelog.js"></script> </body> diff --git a/v8.0.0/output/botcore.html b/v8.0.0/output/botcore.html index fb1691ec..4535657e 100644 --- a/v8.0.0/output/botcore.html +++ b/v8.0.0/output/botcore.html @@ -2,10 +2,10 @@ <html class="no-js" lang="en"> <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.19: https://docutils.sourceforge.io/" /> + <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="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-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>Botcore - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> @@ -208,6 +208,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../../v8.2.1/output/botcore.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../../v8.2.0/output/botcore.html">v8.2.0</a> </li> @@ -346,7 +350,7 @@ <span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><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="n"><span class="pre">guild_id</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allowed_roles</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">http_session</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">redis_session</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">api_client</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">statsd_url</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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/_bot.py#L39-L89"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.BotBase.__init__" title="Permalink to this definition">#</a></dt> <dd><p>Initialise the base bot instance.</p> <dl class="field-list simple"> -<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>guild_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 ID of the guild used for <a class="reference internal" href="#botcore.BotBase.wait_until_guild_available" title="botcore.BotBase.wait_until_guild_available"><code class="xref py py-func docutils literal notranslate"><span class="pre">wait_until_guild_available()</span></code></a>.</p></li> <li><p><strong>allowed_roles</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a>) – A list of role IDs that the bot is allowed to mention.</p></li> @@ -365,7 +369,7 @@ a dummy statsd client will be created.</p></li> <em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">add_cog</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cog</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/_bot.py#L152-L156"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.BotBase.add_cog" title="Permalink to this definition">#</a></dt> <dd><p>Add the given <code class="docutils literal notranslate"><span class="pre">cog</span></code> to the bot and log the operation.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -376,7 +380,7 @@ a dummy statsd client will be created.</p></li> <span class="sig-name descname"><span class="pre">add_command</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">command</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/_bot.py#L157-L161"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.BotBase.add_command" title="Permalink to this definition">#</a></dt> <dd><p>Add <code class="docutils literal notranslate"><span class="pre">command</span></code> as normal and then add its root aliases to the bot.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -387,7 +391,7 @@ a dummy statsd client will be created.</p></li> <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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/_bot.py#L177-L180"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.BotBase.clear" title="Permalink to this definition">#</a></dt> <dd><p>Not implemented! Re-instantiate the bot instead of attempting to re-use a closed one.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -398,7 +402,7 @@ a dummy statsd client will be created.</p></li> <em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">close</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/_bot.py#L258-L289"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.BotBase.close" title="Permalink to this definition">#</a></dt> <dd><p>Close the Discord connection, and the aiohttp session, connector, statsd client, and resolver.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -410,7 +414,7 @@ a dummy statsd client will be created.</p></li> <dd><p>Load all the extensions within the given module and save them to <code class="docutils literal notranslate"><span class="pre">self.all_extensions</span></code>.</p> <p>This should be ran in a task on the event loop to avoid deadlocks caused by <code class="docutils literal notranslate"><span class="pre">wait_for</span></code> calls.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -421,7 +425,7 @@ a dummy statsd client will be created.</p></li> <em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">log_to_dev_log</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">message</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/_bot.py#L205-L208"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.BotBase.log_to_dev_log" title="Permalink to this definition">#</a></dt> <dd><p>Log the given message to #dev-log.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -434,7 +438,7 @@ a dummy statsd client will be created.</p></li> <p>If the cache appears to still be empty (no members, no channels, or no roles), the event will not be set and <cite>guild_available_but_cache_empty</cite> event will be emitted.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -445,7 +449,7 @@ will not be set and <cite>guild_available_but_cache_empty</cite> event will be e <em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">on_guild_unavailable</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">guild</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/_bot.py#L181-L187"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.BotBase.on_guild_unavailable" title="Permalink to this definition">#</a></dt> <dd><p>Clear the internal guild available event when self.guild_id becomes unavailable.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -456,7 +460,7 @@ will not be set and <cite>guild_available_but_cache_empty</cite> event will be e <em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">ping_services</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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/_bot.py#L254-L257"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.BotBase.ping_services" title="Permalink to this definition">#</a></dt> <dd><p>Ping all required services on setup to ensure they are up before starting.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -469,7 +473,7 @@ will not be set and <cite>guild_available_but_cache_empty</cite> event will be e <p>Individual root aliases cannot be removed by this function. To remove them, either remove the entire command or manually edit <cite>bot.all_commands</cite>.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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/latest/ext/commands/api.html#discord.ext.commands.Command" title="(in discord.py v2.1.0a)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Command</span></code></a>]</p> </dd> </dl> @@ -483,7 +487,7 @@ To remove them, either remove the entire command or manually edit <cite>bot.all_ <a class="reference internal" href="botcore.async_stats.html#botcore.async_stats.AsyncStatsClient.create_socket" title="botcore.async_stats.AsyncStatsClient.create_socket"><code class="xref py py-func docutils literal notranslate"><span class="pre">AsyncStatsClient.create_socket</span></code></a> and <a class="reference internal" href="#botcore.BotBase.ping_services" title="botcore.BotBase.ping_services"><code class="xref py py-func docutils literal notranslate"><span class="pre">ping_services()</span></code></a>.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -496,7 +500,7 @@ and <a class="reference internal" href="#botcore.BotBase.ping_services" title="b <p>The on_ready event is inadequate because it only waits 2 seconds for a GUILD_CREATE gateway event before giving up and thus not populating the cache for unavailable guilds.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -522,15 +526,48 @@ gateway event before giving up and thus not populating the cache for unavailable <ul> <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#botcore.utils.apply_monkey_patches"><code class="docutils literal notranslate"><span class="pre">apply_monkey_patches()</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="botcore.utils.html#botcore.utils.unqualify"><code class="docutils literal notranslate"><span class="pre">unqualify()</span></code></a></li> <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.commands.html">commands</a></li> -<li class="toctree-l3"><a class="reference internal" href="botcore.utils.interactions.html">interactions</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> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.caching.html">caching</a><ul> +<li class="toctree-l4"><a class="reference internal" href="botcore.utils.caching.html#botcore.utils.caching.AsyncCache"><code class="docutils literal notranslate"><span class="pre">AsyncCache</span></code></a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.channel.html">channel</a><ul> +<li class="toctree-l4"><a class="reference internal" href="botcore.utils.channel.html#botcore.utils.channel.get_or_fetch_channel"><code class="docutils literal notranslate"><span class="pre">get_or_fetch_channel()</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="botcore.utils.channel.html#botcore.utils.channel.is_in_category"><code class="docutils literal notranslate"><span class="pre">is_in_category()</span></code></a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.commands.html">commands</a><ul> +<li class="toctree-l4"><a class="reference internal" href="botcore.utils.commands.html#botcore.utils.commands.clean_text_or_reply"><code class="docutils literal notranslate"><span class="pre">clean_text_or_reply()</span></code></a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.interactions.html">interactions</a><ul> +<li class="toctree-l4"><a class="reference internal" href="botcore.utils.interactions.html#botcore.utils.interactions.DeleteMessageButton"><code class="docutils literal notranslate"><span class="pre">DeleteMessageButton</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="botcore.utils.interactions.html#botcore.utils.interactions.ViewWithUserAndRoleCheck"><code class="docutils literal notranslate"><span class="pre">ViewWithUserAndRoleCheck</span></code></a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.logging.html">logging</a><ul> +<li class="toctree-l4"><a class="reference internal" href="botcore.utils.logging.html#botcore.utils.logging.CustomLogger"><code class="docutils literal notranslate"><span class="pre">CustomLogger</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="botcore.utils.logging.html#botcore.utils.logging.get_logger"><code class="docutils literal notranslate"><span class="pre">get_logger()</span></code></a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.members.html">members</a><ul> +<li class="toctree-l4"><a class="reference internal" href="botcore.utils.members.html#botcore.utils.members.get_or_fetch_member"><code class="docutils literal notranslate"><span class="pre">get_or_fetch_member()</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="botcore.utils.members.html#botcore.utils.members.handle_role_change"><code class="docutils literal notranslate"><span class="pre">handle_role_change()</span></code></a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.regex.html">regex</a><ul> +<li class="toctree-l4"><a class="reference internal" href="botcore.utils.regex.html#botcore.utils.regex.DISCORD_INVITE"><code class="docutils literal notranslate"><span class="pre">DISCORD_INVITE</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="botcore.utils.regex.html#botcore.utils.regex.FORMATTED_CODE_REGEX"><code class="docutils literal notranslate"><span class="pre">FORMATTED_CODE_REGEX</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="botcore.utils.regex.html#botcore.utils.regex.RAW_CODE_REGEX"><code class="docutils literal notranslate"><span class="pre">RAW_CODE_REGEX</span></code></a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a><ul> +<li class="toctree-l4"><a class="reference internal" href="botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler"><code class="docutils literal notranslate"><span class="pre">Scheduler</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="botcore.utils.scheduling.html#botcore.utils.scheduling.create_task"><code class="docutils literal notranslate"><span class="pre">create_task()</span></code></a></li> +</ul> +</li> </ul> </li> </ul> @@ -542,8 +579,34 @@ gateway event before giving up and thus not populating the cache for unavailable <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this heading">#</a></h2> <div class="toctree-wrapper compound"> <ul> -<li class="toctree-l1"><a class="reference internal" href="botcore.async_stats.html">async_stats</a></li> -<li class="toctree-l1"><a class="reference internal" href="botcore.site_api.html">site_api</a></li> +<li class="toctree-l1"><a class="reference internal" href="botcore.async_stats.html">async_stats</a><ul> +<li class="toctree-l2"><a class="reference internal" href="botcore.async_stats.html#botcore.async_stats.AsyncStatsClient"><code class="docutils literal notranslate"><span class="pre">AsyncStatsClient</span></code></a><ul> +<li class="toctree-l3"><a class="reference internal" href="botcore.async_stats.html#botcore.async_stats.AsyncStatsClient.__init__"><code class="docutils literal notranslate"><span class="pre">AsyncStatsClient.__init__()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.async_stats.html#botcore.async_stats.AsyncStatsClient.create_socket"><code class="docutils literal notranslate"><span class="pre">AsyncStatsClient.create_socket()</span></code></a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="botcore.site_api.html">site_api</a><ul> +<li class="toctree-l2"><a class="reference internal" href="botcore.site_api.html#botcore.site_api.APIClient"><code class="docutils literal notranslate"><span class="pre">APIClient</span></code></a><ul> +<li class="toctree-l3"><a class="reference internal" href="botcore.site_api.html#botcore.site_api.APIClient.__init__"><code class="docutils literal notranslate"><span class="pre">APIClient.__init__()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.site_api.html#botcore.site_api.APIClient.close"><code class="docutils literal notranslate"><span class="pre">APIClient.close()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.site_api.html#botcore.site_api.APIClient.delete"><code class="docutils literal notranslate"><span class="pre">APIClient.delete()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.site_api.html#botcore.site_api.APIClient.get"><code class="docutils literal notranslate"><span class="pre">APIClient.get()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.site_api.html#botcore.site_api.APIClient.maybe_raise_for_status"><code class="docutils literal notranslate"><span class="pre">APIClient.maybe_raise_for_status()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.site_api.html#botcore.site_api.APIClient.patch"><code class="docutils literal notranslate"><span class="pre">APIClient.patch()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.site_api.html#botcore.site_api.APIClient.post"><code class="docutils literal notranslate"><span class="pre">APIClient.post()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.site_api.html#botcore.site_api.APIClient.put"><code class="docutils literal notranslate"><span class="pre">APIClient.put()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.site_api.html#botcore.site_api.APIClient.request"><code class="docutils literal notranslate"><span class="pre">APIClient.request()</span></code></a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="botcore.site_api.html#botcore.site_api.ResponseCodeError"><code class="docutils literal notranslate"><span class="pre">ResponseCodeError</span></code></a><ul> +<li class="toctree-l3"><a class="reference internal" href="botcore.site_api.html#botcore.site_api.ResponseCodeError.__init__"><code class="docutils literal notranslate"><span class="pre">ResponseCodeError.__init__()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.site_api.html#botcore.site_api.ResponseCodeError.__str__"><code class="docutils literal notranslate"><span class="pre">ResponseCodeError.__str__()</span></code></a></li> +</ul> +</li> +</ul> +</li> </ul> </div> </section> @@ -607,6 +670,26 @@ gateway event before giving up and thus not populating the cache for unavailable <div class="toc-tree"> <ul> <li><a class="reference internal" href="#">Botcore</a><ul> +<li><a class="reference internal" href="#botcore.BotBase"><code class="docutils literal notranslate"><span class="pre">BotBase</span></code></a><ul> +<li><a class="reference internal" href="#botcore.BotBase.__init__"><code class="docutils literal notranslate"><span class="pre">BotBase.__init__()</span></code></a></li> +<li><a class="reference internal" href="#botcore.BotBase.add_cog"><code class="docutils literal notranslate"><span class="pre">BotBase.add_cog()</span></code></a></li> +<li><a class="reference internal" href="#botcore.BotBase.add_command"><code class="docutils literal notranslate"><span class="pre">BotBase.add_command()</span></code></a></li> +<li><a class="reference internal" href="#botcore.BotBase.clear"><code class="docutils literal notranslate"><span class="pre">BotBase.clear()</span></code></a></li> +<li><a class="reference internal" href="#botcore.BotBase.close"><code class="docutils literal notranslate"><span class="pre">BotBase.close()</span></code></a></li> +<li><a class="reference internal" href="#botcore.BotBase.load_extensions"><code class="docutils literal notranslate"><span class="pre">BotBase.load_extensions()</span></code></a></li> +<li><a class="reference internal" href="#botcore.BotBase.log_to_dev_log"><code class="docutils literal notranslate"><span class="pre">BotBase.log_to_dev_log()</span></code></a></li> +<li><a class="reference internal" href="#botcore.BotBase.on_guild_available"><code class="docutils literal notranslate"><span class="pre">BotBase.on_guild_available()</span></code></a></li> +<li><a class="reference internal" href="#botcore.BotBase.on_guild_unavailable"><code class="docutils literal notranslate"><span class="pre">BotBase.on_guild_unavailable()</span></code></a></li> +<li><a class="reference internal" href="#botcore.BotBase.ping_services"><code class="docutils literal notranslate"><span class="pre">BotBase.ping_services()</span></code></a></li> +<li><a class="reference internal" href="#botcore.BotBase.remove_command"><code class="docutils literal notranslate"><span class="pre">BotBase.remove_command()</span></code></a></li> +<li><a class="reference internal" href="#botcore.BotBase.setup_hook"><code class="docutils literal notranslate"><span class="pre">BotBase.setup_hook()</span></code></a></li> +<li><a class="reference internal" href="#botcore.BotBase.wait_until_guild_available"><code class="docutils literal notranslate"><span class="pre">BotBase.wait_until_guild_available()</span></code></a></li> +</ul> +</li> +<li><a class="reference internal" href="#botcore.StartupError"><code class="docutils literal notranslate"><span class="pre">StartupError</span></code></a><ul> +<li><a class="reference internal" href="#botcore.StartupError.__init__"><code class="docutils literal notranslate"><span class="pre">StartupError.__init__()</span></code></a></li> +</ul> +</li> <li><a class="reference internal" href="#subpackages">Subpackages</a></li> <li><a class="reference internal" href="#submodules">Submodules</a></li> </ul> @@ -625,6 +708,7 @@ gateway event before giving up and thus not populating the cache for unavailable <script src="../_static/underscore.js"></script> <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="../_static/doctools.js"></script> + <script src="../_static/sphinx_highlight.js"></script> <script src="../_static/scripts/furo.js"></script> <script src="../_static/changelog.js"></script> </body> diff --git a/v8.0.0/output/botcore.site_api.html b/v8.0.0/output/botcore.site_api.html index 88ea3881..dd6ba7ea 100644 --- a/v8.0.0/output/botcore.site_api.html +++ b/v8.0.0/output/botcore.site_api.html @@ -2,10 +2,10 @@ <html class="no-js" lang="en"> <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.19: https://docutils.sourceforge.io/" /> + <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="Local Development & Testing" href="../development.html" /><link rel="prev" title="async_stats" href="botcore.async_stats.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-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>site_api - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> @@ -138,7 +138,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> @@ -208,6 +208,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../../v8.2.1/output/botcore.site_api.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../../v8.2.0/output/botcore.site_api.html">v8.2.0</a> </li> @@ -327,7 +331,7 @@ <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> @@ -346,7 +350,7 @@ <span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">site_api_url</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">site_api_token</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">session_kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/site_api.py#L48-L71"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.__init__" title="Permalink to this definition">#</a></dt> <dd><p>Initialize a new <a class="reference internal" href="#botcore.site_api.APIClient" title="botcore.site_api.APIClient"><code class="xref py py-obj docutils literal notranslate"><span class="pre">APIClient</span></code></a> instance.</p> <dl class="field-list simple"> -<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>site_api_url</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>) – The URL of the site API.</p></li> <li><p><strong>site_api_token</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>) – The token to use for authentication.</p></li> @@ -361,7 +365,7 @@ <em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">close</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/site_api.py#L75-L78"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.close" title="Permalink to this definition">#</a></dt> <dd><p>Close the aiohttp session.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -372,17 +376,17 @@ <em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">delete</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">endpoint</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_for_status</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/site_api.py#L137-L155"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.delete" title="Permalink to this definition">#</a></dt> <dd><p>Send a DELETE request to the site API and return the JSON response.</p> <dl class="field-list simple"> -<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>endpoint</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>) – The endpoint to send the request to.</p></li> <li><p><strong>raise_for_status</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – Whether or not to raise an exception if the response is not OK.</p></li> <li><p><strong>**kwargs</strong> – Any extra keyword arguments to pass to <a class="reference external" href="https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.request" title="(in aiohttp v3.8)"><code class="xref py py-func docutils literal notranslate"><span class="pre">aiohttp.request()</span></code></a>.</p></li> </ul> </dd> -<dt class="field-even">Return type<span class="colon">:</span></dt> +<dt class="field-even">Return type</dt> <dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Optional" title="(in Python v3.10)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a>]</p> </dd> -<dt class="field-odd">Returns<span class="colon">:</span></dt> +<dt class="field-odd">Returns</dt> <dd class="field-odd"><p>The JSON response the API returns, or None if the response is 204 No Content.</p> </dd> </dl> @@ -393,7 +397,7 @@ <em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">endpoint</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_for_status</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/site_api.py#L121-L124"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.get" title="Permalink to this definition">#</a></dt> <dd><p>Equivalent to <a class="reference internal" href="#botcore.site_api.APIClient.request" title="botcore.site_api.APIClient.request"><code class="xref py py-meth docutils literal notranslate"><span class="pre">APIClient.request()</span></code></a> with GET passed as the method.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<dt class="field-odd">Return type</dt> <dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a></p> </dd> </dl> @@ -404,16 +408,16 @@ <em class="property"><span class="pre">async</span><span class="w"> </span><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">maybe_raise_for_status</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">response</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">should_raise</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/site_api.py#L79-L99"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.maybe_raise_for_status" title="Permalink to this definition">#</a></dt> <dd><p>Raise <a class="reference internal" href="#botcore.site_api.ResponseCodeError" title="botcore.site_api.ResponseCodeError"><code class="xref py py-exc docutils literal notranslate"><span class="pre">ResponseCodeError</span></code></a> for non-OK response if an exception should be raised.</p> <dl class="field-list simple"> -<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>response</strong> (<a class="reference external" href="https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.ClientResponse" title="(in aiohttp v3.8)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">aiohttp.ClientResponse</span></code></a>) – The response to check.</p></li> <li><p><strong>should_raise</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – Whether or not to raise an exception.</p></li> </ul> </dd> -<dt class="field-even">Raises<span class="colon">:</span></dt> +<dt class="field-even">Raises</dt> <dd class="field-even"><p><a class="reference internal" href="#botcore.site_api.ResponseCodeError" title="botcore.site_api.ResponseCodeError"><strong>ResponseCodeError</strong></a> – If the response is not OK and <code class="docutils literal notranslate"><span class="pre">should_raise</span></code> is True.</p> </dd> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -424,7 +428,7 @@ <em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">patch</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">endpoint</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_for_status</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/site_api.py#L125-L128"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.patch" title="Permalink to this definition">#</a></dt> <dd><p>Equivalent to <a class="reference internal" href="#botcore.site_api.APIClient.request" title="botcore.site_api.APIClient.request"><code class="xref py py-meth docutils literal notranslate"><span class="pre">APIClient.request()</span></code></a> with PATCH passed as the method.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<dt class="field-odd">Return type</dt> <dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a></p> </dd> </dl> @@ -435,7 +439,7 @@ <em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">post</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">endpoint</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_for_status</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/site_api.py#L129-L132"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.post" title="Permalink to this definition">#</a></dt> <dd><p>Equivalent to <a class="reference internal" href="#botcore.site_api.APIClient.request" title="botcore.site_api.APIClient.request"><code class="xref py py-meth docutils literal notranslate"><span class="pre">APIClient.request()</span></code></a> with POST passed as the method.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<dt class="field-odd">Return type</dt> <dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a></p> </dd> </dl> @@ -446,7 +450,7 @@ <em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">put</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">endpoint</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_for_status</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/site_api.py#L133-L136"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.put" title="Permalink to this definition">#</a></dt> <dd><p>Equivalent to <a class="reference internal" href="#botcore.site_api.APIClient.request" title="botcore.site_api.APIClient.request"><code class="xref py py-meth docutils literal notranslate"><span class="pre">APIClient.request()</span></code></a> with PUT passed as the method.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<dt class="field-odd">Return type</dt> <dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a></p> </dd> </dl> @@ -457,7 +461,7 @@ <em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">method</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">endpoint</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_for_status</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/site_api.py#L100-L120"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.APIClient.request" title="Permalink to this definition">#</a></dt> <dd><p>Send an HTTP request to the site API and return the JSON response.</p> <dl class="field-list simple"> -<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>method</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>) – The HTTP method to use.</p></li> <li><p><strong>endpoint</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>) – The endpoint to send the request to.</p></li> @@ -465,13 +469,13 @@ <li><p><strong>**kwargs</strong> – Any extra keyword arguments to pass to <a class="reference external" href="https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.request" title="(in aiohttp v3.8)"><code class="xref py py-func docutils literal notranslate"><span class="pre">aiohttp.request()</span></code></a>.</p></li> </ul> </dd> -<dt class="field-even">Return type<span class="colon">:</span></dt> +<dt class="field-even">Return type</dt> <dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a></p> </dd> -<dt class="field-odd">Returns<span class="colon">:</span></dt> +<dt class="field-odd">Returns</dt> <dd class="field-odd"><p>The JSON response the API returns.</p> </dd> -<dt class="field-even">Raises<span class="colon">:</span></dt> +<dt class="field-even">Raises</dt> <dd class="field-even"><p><a class="reference internal" href="#botcore.site_api.ResponseCodeError" title="botcore.site_api.ResponseCodeError"><strong>ResponseCodeError</strong></a> – If the response is not OK and <code class="docutils literal notranslate"><span class="pre">raise_for_status</span></code> is True.</p> </dd> </dl> @@ -489,7 +493,7 @@ <span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">response</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">response_json</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">response_text</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/site_api.py#L17-L35"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.site_api.ResponseCodeError.__init__" title="Permalink to this definition">#</a></dt> <dd><p>Initialize a new <a class="reference internal" href="#botcore.site_api.ResponseCodeError" title="botcore.site_api.ResponseCodeError"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ResponseCodeError</span></code></a> instance.</p> <dl class="field-list simple"> -<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>response</strong> (<a class="reference external" href="https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.ClientResponse" title="(in aiohttp v3.8)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">aiohttp.ClientResponse</span></code></a>) – The response object from the request.</p></li> <li><p><strong>response_json</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Optional" title="(in Python v3.10)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a>]) – The JSON response returned from the request, if any.</p></li> @@ -554,9 +558,44 @@ </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"> + On this page + </span> + </div> + <div class="toc-tree-container"> + <div class="toc-tree"> + <ul> +<li><a class="reference internal" href="#">site_api</a><ul> +<li><a class="reference internal" href="#botcore.site_api.APIClient"><code class="docutils literal notranslate"><span class="pre">APIClient</span></code></a><ul> +<li><a class="reference internal" href="#botcore.site_api.APIClient.__init__"><code class="docutils literal notranslate"><span class="pre">APIClient.__init__()</span></code></a></li> +<li><a class="reference internal" href="#botcore.site_api.APIClient.close"><code class="docutils literal notranslate"><span class="pre">APIClient.close()</span></code></a></li> +<li><a class="reference internal" href="#botcore.site_api.APIClient.delete"><code class="docutils literal notranslate"><span class="pre">APIClient.delete()</span></code></a></li> +<li><a class="reference internal" href="#botcore.site_api.APIClient.get"><code class="docutils literal notranslate"><span class="pre">APIClient.get()</span></code></a></li> +<li><a class="reference internal" href="#botcore.site_api.APIClient.maybe_raise_for_status"><code class="docutils literal notranslate"><span class="pre">APIClient.maybe_raise_for_status()</span></code></a></li> +<li><a class="reference internal" href="#botcore.site_api.APIClient.patch"><code class="docutils literal notranslate"><span class="pre">APIClient.patch()</span></code></a></li> +<li><a class="reference internal" href="#botcore.site_api.APIClient.post"><code class="docutils literal notranslate"><span class="pre">APIClient.post()</span></code></a></li> +<li><a class="reference internal" href="#botcore.site_api.APIClient.put"><code class="docutils literal notranslate"><span class="pre">APIClient.put()</span></code></a></li> +<li><a class="reference internal" href="#botcore.site_api.APIClient.request"><code class="docutils literal notranslate"><span class="pre">APIClient.request()</span></code></a></li> +</ul> +</li> +<li><a class="reference internal" href="#botcore.site_api.ResponseCodeError"><code class="docutils literal notranslate"><span class="pre">ResponseCodeError</span></code></a><ul> +<li><a class="reference internal" href="#botcore.site_api.ResponseCodeError.__init__"><code class="docutils literal notranslate"><span class="pre">ResponseCodeError.__init__()</span></code></a></li> +<li><a class="reference internal" href="#botcore.site_api.ResponseCodeError.__str__"><code class="docutils literal notranslate"><span class="pre">ResponseCodeError.__str__()</span></code></a></li> +</ul> +</li> +</ul> +</li> +</ul> + + </div> + </div> + </div> + </aside> </div> @@ -565,6 +604,7 @@ <script src="../_static/underscore.js"></script> <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="../_static/doctools.js"></script> + <script src="../_static/sphinx_highlight.js"></script> <script src="../_static/scripts/furo.js"></script> <script src="../_static/changelog.js"></script> </body> diff --git a/v8.0.0/output/botcore.utils.caching.html b/v8.0.0/output/botcore.utils.caching.html index cc7680ec..4d58233c 100644 --- a/v8.0.0/output/botcore.utils.caching.html +++ b/v8.0.0/output/botcore.utils.caching.html @@ -2,10 +2,10 @@ <html class="no-js" lang="en"> <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.19: https://docutils.sourceforge.io/" /> + <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-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>caching - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> @@ -138,7 +138,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> @@ -208,6 +208,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../../v8.2.1/output/botcore.utils.caching.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../../v8.2.0/output/botcore.utils.caching.html">v8.2.0</a> </li> @@ -327,7 +331,7 @@ <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> @@ -348,13 +352,13 @@ <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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/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<span class="colon">:</span></dt> +<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<span class="colon">:</span></dt> +<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<span class="colon">:</span></dt> +<dt class="field-odd">Returns</dt> <dd class="field-odd"><p>A decorator to wrap the target function.</p> </dd> </dl> @@ -365,7 +369,7 @@ <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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/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<span class="colon">:</span></dt> +<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> @@ -376,7 +380,7 @@ <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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/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<span class="colon">:</span></dt> +<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> @@ -431,8 +435,32 @@ </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"> + On this page + </span> + </div> + <div class="toc-tree-container"> + <div class="toc-tree"> + <ul> +<li><a class="reference internal" href="#">caching</a><ul> +<li><a class="reference internal" href="#botcore.utils.caching.AsyncCache"><code class="docutils literal notranslate"><span class="pre">AsyncCache</span></code></a><ul> +<li><a class="reference internal" href="#botcore.utils.caching.AsyncCache.__call__"><code class="docutils literal notranslate"><span class="pre">AsyncCache.__call__()</span></code></a></li> +<li><a class="reference internal" href="#botcore.utils.caching.AsyncCache.__init__"><code class="docutils literal notranslate"><span class="pre">AsyncCache.__init__()</span></code></a></li> +<li><a class="reference internal" href="#botcore.utils.caching.AsyncCache.clear"><code class="docutils literal notranslate"><span class="pre">AsyncCache.clear()</span></code></a></li> +</ul> +</li> +</ul> +</li> +</ul> + + </div> + </div> + </div> </aside> @@ -442,6 +470,7 @@ <script src="../_static/underscore.js"></script> <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="../_static/doctools.js"></script> + <script src="../_static/sphinx_highlight.js"></script> <script src="../_static/scripts/furo.js"></script> <script src="../_static/changelog.js"></script> </body> diff --git a/v8.0.0/output/botcore.utils.channel.html b/v8.0.0/output/botcore.utils.channel.html index 55edf4b1..f7cb2ed3 100644 --- a/v8.0.0/output/botcore.utils.channel.html +++ b/v8.0.0/output/botcore.utils.channel.html @@ -2,10 +2,10 @@ <html class="no-js" lang="en"> <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.19: https://docutils.sourceforge.io/" /> + <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="commands" href="botcore.utils.commands.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-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>channel - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> @@ -138,7 +138,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> @@ -208,6 +208,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../../v8.2.1/output/botcore.utils.channel.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../../v8.2.0/output/botcore.utils.channel.html">v8.2.0</a> </li> @@ -327,7 +331,7 @@ <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> @@ -341,13 +345,13 @@ <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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/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<span class="colon">:</span></dt> +<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/latest/ext/commands/api.html#discord.ext.commands.Bot" title="(in discord.py v2.1.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/latest/ext/commands/api.html#discord.ext.commands.Bot" title="(in discord.py v2.1.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<span class="colon">:</span></dt> +<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/latest/api.html#discord.InvalidData" title="(in discord.py v2.1.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/latest/api.html#discord.HTTPException" title="(in discord.py v2.1.0a)"><strong>discord.HTTPException</strong></a> – Retrieving the channel failed.</p></li> @@ -355,10 +359,10 @@ <li><p><a class="reference external" href="https://discordpy.readthedocs.io/en/latest/api.html#discord.Forbidden" title="(in discord.py v2.1.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<span class="colon">:</span></dt> +<dt class="field-odd">Return type</dt> <dd class="field-odd"><p><a class="reference external" href="https://discordpy.readthedocs.io/en/latest/api.html#discord.abc.GuildChannel" title="(in discord.py v2.1.0a)"><code class="xref py py-class docutils literal notranslate"><span class="pre">GuildChannel</span></code></a></p> </dd> -<dt class="field-even">Returns<span class="colon">:</span></dt> +<dt class="field-even">Returns</dt> <dd class="field-even"><p>The channel from the ID.</p> </dd> </dl> @@ -369,16 +373,16 @@ <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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/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<span class="colon">:</span></dt> +<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/latest/api.html#discord.TextChannel" title="(in discord.py v2.1.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<span class="colon">:</span></dt> +<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<span class="colon">:</span></dt> +<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> @@ -431,8 +435,28 @@ </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"> + On this page + </span> + </div> + <div class="toc-tree-container"> + <div class="toc-tree"> + <ul> +<li><a class="reference internal" href="#">channel</a><ul> +<li><a class="reference internal" href="#botcore.utils.channel.get_or_fetch_channel"><code class="docutils literal notranslate"><span class="pre">get_or_fetch_channel()</span></code></a></li> +<li><a class="reference internal" href="#botcore.utils.channel.is_in_category"><code class="docutils literal notranslate"><span class="pre">is_in_category()</span></code></a></li> +</ul> +</li> +</ul> + + </div> + </div> + </div> </aside> @@ -442,6 +466,7 @@ <script src="../_static/underscore.js"></script> <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="../_static/doctools.js"></script> + <script src="../_static/sphinx_highlight.js"></script> <script src="../_static/scripts/furo.js"></script> <script src="../_static/changelog.js"></script> </body> diff --git a/v8.0.0/output/botcore.utils.commands.html b/v8.0.0/output/botcore.utils.commands.html index 5891a3d5..6e368876 100644 --- a/v8.0.0/output/botcore.utils.commands.html +++ b/v8.0.0/output/botcore.utils.commands.html @@ -2,10 +2,10 @@ <html class="no-js" lang="en"> <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.19: https://docutils.sourceforge.io/" /> + <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="interactions" href="botcore.utils.interactions.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-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>commands - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> @@ -138,7 +138,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> @@ -208,6 +208,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../../v8.2.1/output/botcore.utils.commands.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../../v8.2.0/output/botcore.utils.commands.html">v8.2.0</a> </li> @@ -327,7 +331,7 @@ <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> @@ -340,19 +344,19 @@ <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">clean_text_or_reply</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ctx</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/utils/commands.py#L7-L39"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.commands.clean_text_or_reply" title="Permalink to this definition">#</a></dt> <dd><p>Cleans a text argument or replied message’s content.</p> <dl class="field-list simple"> -<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>ctx</strong> (<a class="reference external" href="https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Context" title="(in discord.py v2.1.0a)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Context</span></code></a>) – The command’s context</p></li> <li><p><strong>text</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 provided text argument of the command (if given)</p></li> </ul> </dd> -<dt class="field-even">Raises<span class="colon">:</span></dt> +<dt class="field-even">Raises</dt> <dd class="field-even"><p><a class="reference external" href="https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.BadArgument" title="(in discord.py v2.1.0a)"><strong>discord.ext.commands.BadArgument</strong></a> – <cite>text</cite> wasn’t provided and there’s no reply message / reply message content.</p> </dd> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<dt class="field-odd">Return type</dt> <dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#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-even">Returns<span class="colon">:</span></dt> +<dt class="field-even">Returns</dt> <dd class="field-even"><p>The cleaned version of <cite>text</cite>, if given, else replied message.</p> </dd> </dl> @@ -405,8 +409,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"> + On this page + </span> + </div> + <div class="toc-tree-container"> + <div class="toc-tree"> + <ul> +<li><a class="reference internal" href="#">commands</a><ul> +<li><a class="reference internal" href="#botcore.utils.commands.clean_text_or_reply"><code class="docutils literal notranslate"><span class="pre">clean_text_or_reply()</span></code></a></li> +</ul> +</li> +</ul> + + </div> + </div> + </div> </aside> @@ -416,6 +439,7 @@ <script src="../_static/underscore.js"></script> <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="../_static/doctools.js"></script> + <script src="../_static/sphinx_highlight.js"></script> <script src="../_static/scripts/furo.js"></script> <script src="../_static/changelog.js"></script> </body> diff --git a/v8.0.0/output/botcore.utils.html b/v8.0.0/output/botcore.utils.html index 40be78bc..f55b2a75 100644 --- a/v8.0.0/output/botcore.utils.html +++ b/v8.0.0/output/botcore.utils.html @@ -2,10 +2,10 @@ <html class="no-js" lang="en"> <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.19: https://docutils.sourceforge.io/" /> + <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-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>Utils - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> @@ -208,6 +208,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../../v8.2.1/output/botcore.utils.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../../v8.2.0/output/botcore.utils.html">v8.2.0</a> </li> @@ -349,7 +353,7 @@ that will act as top-level groups rather than being aliases of the command’s g </dd> </dl> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -360,13 +364,13 @@ that will act as top-level groups rather than being aliases of the command’s g <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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/utils/_extensions.py#L10-L21"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.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<span class="colon">:</span></dt> +<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<span class="colon">:</span></dt> +<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<span class="colon">:</span></dt> +<dt class="field-odd">Returns</dt> <dd class="field-odd"><p>The unqualified module name.</p> </dd> </dl> @@ -376,14 +380,71 @@ that will act as top-level groups rather than being aliases of the command’s g <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this heading">#</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.commands.html">commands</a></li> -<li class="toctree-l1"><a class="reference internal" href="botcore.utils.interactions.html">interactions</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> +<li class="toctree-l1"><a class="reference internal" href="botcore.utils.caching.html">caching</a><ul> +<li class="toctree-l2"><a class="reference internal" href="botcore.utils.caching.html#botcore.utils.caching.AsyncCache"><code class="docutils literal notranslate"><span class="pre">AsyncCache</span></code></a><ul> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.caching.html#botcore.utils.caching.AsyncCache.__call__"><code class="docutils literal notranslate"><span class="pre">AsyncCache.__call__()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.caching.html#botcore.utils.caching.AsyncCache.__init__"><code class="docutils literal notranslate"><span class="pre">AsyncCache.__init__()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.caching.html#botcore.utils.caching.AsyncCache.clear"><code class="docutils literal notranslate"><span class="pre">AsyncCache.clear()</span></code></a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="botcore.utils.channel.html">channel</a><ul> +<li class="toctree-l2"><a class="reference internal" href="botcore.utils.channel.html#botcore.utils.channel.get_or_fetch_channel"><code class="docutils literal notranslate"><span class="pre">get_or_fetch_channel()</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="botcore.utils.channel.html#botcore.utils.channel.is_in_category"><code class="docutils literal notranslate"><span class="pre">is_in_category()</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="botcore.utils.commands.html">commands</a><ul> +<li class="toctree-l2"><a class="reference internal" href="botcore.utils.commands.html#botcore.utils.commands.clean_text_or_reply"><code class="docutils literal notranslate"><span class="pre">clean_text_or_reply()</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="botcore.utils.interactions.html">interactions</a><ul> +<li class="toctree-l2"><a class="reference internal" href="botcore.utils.interactions.html#botcore.utils.interactions.DeleteMessageButton"><code class="docutils literal notranslate"><span class="pre">DeleteMessageButton</span></code></a><ul> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.interactions.html#botcore.utils.interactions.DeleteMessageButton.__init__"><code class="docutils literal notranslate"><span class="pre">DeleteMessageButton.__init__()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.interactions.html#botcore.utils.interactions.DeleteMessageButton.callback"><code class="docutils literal notranslate"><span class="pre">DeleteMessageButton.callback()</span></code></a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="botcore.utils.interactions.html#botcore.utils.interactions.ViewWithUserAndRoleCheck"><code class="docutils literal notranslate"><span class="pre">ViewWithUserAndRoleCheck</span></code></a><ul> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.interactions.html#botcore.utils.interactions.ViewWithUserAndRoleCheck.__init__"><code class="docutils literal notranslate"><span class="pre">ViewWithUserAndRoleCheck.__init__()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.interactions.html#botcore.utils.interactions.ViewWithUserAndRoleCheck.interaction_check"><code class="docutils literal notranslate"><span class="pre">ViewWithUserAndRoleCheck.interaction_check()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.interactions.html#botcore.utils.interactions.ViewWithUserAndRoleCheck.on_timeout"><code class="docutils literal notranslate"><span class="pre">ViewWithUserAndRoleCheck.on_timeout()</span></code></a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="botcore.utils.logging.html">logging</a><ul> +<li class="toctree-l2"><a class="reference internal" href="botcore.utils.logging.html#botcore.utils.logging.CustomLogger"><code class="docutils literal notranslate"><span class="pre">CustomLogger</span></code></a><ul> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.logging.html#botcore.utils.logging.CustomLogger.trace"><code class="docutils literal notranslate"><span class="pre">CustomLogger.trace()</span></code></a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="botcore.utils.logging.html#botcore.utils.logging.get_logger"><code class="docutils literal notranslate"><span class="pre">get_logger()</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="botcore.utils.members.html">members</a><ul> +<li class="toctree-l2"><a class="reference internal" href="botcore.utils.members.html#botcore.utils.members.get_or_fetch_member"><code class="docutils literal notranslate"><span class="pre">get_or_fetch_member()</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="botcore.utils.members.html#botcore.utils.members.handle_role_change"><code class="docutils literal notranslate"><span class="pre">handle_role_change()</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="botcore.utils.regex.html">regex</a><ul> +<li class="toctree-l2"><a class="reference internal" href="botcore.utils.regex.html#botcore.utils.regex.DISCORD_INVITE"><code class="docutils literal notranslate"><span class="pre">DISCORD_INVITE</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="botcore.utils.regex.html#botcore.utils.regex.FORMATTED_CODE_REGEX"><code class="docutils literal notranslate"><span class="pre">FORMATTED_CODE_REGEX</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="botcore.utils.regex.html#botcore.utils.regex.RAW_CODE_REGEX"><code class="docutils literal notranslate"><span class="pre">RAW_CODE_REGEX</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="botcore.utils.scheduling.html">scheduling</a><ul> +<li class="toctree-l2"><a class="reference internal" href="botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler"><code class="docutils literal notranslate"><span class="pre">Scheduler</span></code></a><ul> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler.__contains__"><code class="docutils literal notranslate"><span class="pre">Scheduler.__contains__()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler.__init__"><code class="docutils literal notranslate"><span class="pre">Scheduler.__init__()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler.cancel"><code class="docutils literal notranslate"><span class="pre">Scheduler.cancel()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler.cancel_all"><code class="docutils literal notranslate"><span class="pre">Scheduler.cancel_all()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler.schedule"><code class="docutils literal notranslate"><span class="pre">Scheduler.schedule()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler.schedule_at"><code class="docutils literal notranslate"><span class="pre">Scheduler.schedule_at()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="botcore.utils.scheduling.html#botcore.utils.scheduling.Scheduler.schedule_later"><code class="docutils literal notranslate"><span class="pre">Scheduler.schedule_later()</span></code></a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="botcore.utils.scheduling.html#botcore.utils.scheduling.create_task"><code class="docutils literal notranslate"><span class="pre">create_task()</span></code></a></li> +</ul> +</li> </ul> </div> </section> @@ -447,6 +508,8 @@ that will act as top-level groups rather than being aliases of the command’s g <div class="toc-tree"> <ul> <li><a class="reference internal" href="#">Utils</a><ul> +<li><a class="reference internal" href="#botcore.utils.apply_monkey_patches"><code class="docutils literal notranslate"><span class="pre">apply_monkey_patches()</span></code></a></li> +<li><a class="reference internal" href="#botcore.utils.unqualify"><code class="docutils literal notranslate"><span class="pre">unqualify()</span></code></a></li> <li><a class="reference internal" href="#submodules">Submodules</a></li> </ul> </li> @@ -464,6 +527,7 @@ that will act as top-level groups rather than being aliases of the command’s g <script src="../_static/underscore.js"></script> <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="../_static/doctools.js"></script> + <script src="../_static/sphinx_highlight.js"></script> <script src="../_static/scripts/furo.js"></script> <script src="../_static/changelog.js"></script> </body> diff --git a/v8.0.0/output/botcore.utils.interactions.html b/v8.0.0/output/botcore.utils.interactions.html index 7e1f4ae7..4cca4d15 100644 --- a/v8.0.0/output/botcore.utils.interactions.html +++ b/v8.0.0/output/botcore.utils.interactions.html @@ -2,10 +2,10 @@ <html class="no-js" lang="en"> <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.19: https://docutils.sourceforge.io/" /> + <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="commands" href="botcore.utils.commands.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-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>interactions - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> @@ -138,7 +138,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> @@ -208,6 +208,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../../v8.2.1/output/botcore.utils.interactions.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../../v8.2.0/output/botcore.utils.interactions.html">v8.2.0</a> </li> @@ -327,7 +331,7 @@ <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> @@ -343,7 +347,7 @@ <p>This button itself carries out no interaction checks, these should be done by the parent view.</p> <p>See <a class="reference internal" href="#botcore.utils.interactions.ViewWithUserAndRoleCheck" title="botcore.utils.interactions.ViewWithUserAndRoleCheck"><code class="xref py py-obj docutils literal notranslate"><span class="pre">botcore.utils.interactions.ViewWithUserAndRoleCheck</span></code></a> for a view that implements basic checks.</p> <dl class="field-list simple"> -<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>style</strong> (<a class="reference external" href="https://discordpy.readthedocs.io/en/latest/interactions/api.html#discord.ButtonStyle"><code class="docutils literal notranslate"><span class="pre">ButtonStyle</span></code></a>) – The style of the button, set to <code class="docutils literal notranslate"><span class="pre">ButtonStyle.secondary</span></code> if not specified.</p></li> <li><p><strong>label</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 label of the button, set to “Delete” if not specified.</p></li> @@ -360,7 +364,7 @@ <em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">callback</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">interaction</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/utils/interactions.py#L96-L99"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.interactions.DeleteMessageButton.callback" title="Permalink to this definition">#</a></dt> <dd><p>Delete the original message on button click.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -374,7 +378,7 @@ <dd><p>Bases: <a class="reference external" href="https://discordpy.readthedocs.io/en/latest/interactions/api.html#discord.ui.View" title="(in discord.py v2.1.0a)"><code class="xref py py-class docutils literal notranslate"><span class="pre">View</span></code></a></p> <p>A view that allows the original invoker and moderators to interact with it.</p> <dl class="field-list simple"> -<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>allowed_users</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Sequence" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sequence</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 sequence of user’s ids who are allowed to interact with the view.</p></li> <li><p><strong>allowed_roles</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Sequence" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sequence</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 sequence of role ids that are allowed to interact with the view.</p></li> @@ -395,10 +399,10 @@ If <code class="docutils literal notranslate"><span class="pre">None</span></cod <em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">interaction_check</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">interaction</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/utils/interactions.py#L37-L64"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.interactions.ViewWithUserAndRoleCheck.interaction_check" title="Permalink to this definition">#</a></dt> <dd><p>Ensure the user clicking the button is the view invoker, or a moderator.</p> <dl class="field-list simple"> -<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dt class="field-odd">Parameters</dt> <dd class="field-odd"><p><strong>interaction</strong> (<a class="reference external" href="https://discordpy.readthedocs.io/en/latest/interactions/api.html#discord.Interaction" title="(in discord.py v2.1.0a)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Interaction</span></code></a>) – The interaction that occurred.</p> </dd> -<dt class="field-even">Return type<span class="colon">:</span></dt> +<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> </dl> @@ -409,7 +413,7 @@ If <code class="docutils literal notranslate"><span class="pre">None</span></cod <em class="property"><span class="pre">async</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">on_timeout</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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/utils/interactions.py#L65-L71"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.interactions.ViewWithUserAndRoleCheck.on_timeout" title="Permalink to this definition">#</a></dt> <dd><p>Remove the view from <code class="docutils literal notranslate"><span class="pre">self.message</span></code> if set.</p> <dl class="field-list simple"> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -464,9 +468,38 @@ If <code class="docutils literal notranslate"><span class="pre">None</span></cod </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"> + On this page + </span> + </div> + <div class="toc-tree-container"> + <div class="toc-tree"> + <ul> +<li><a class="reference internal" href="#">interactions</a><ul> +<li><a class="reference internal" href="#botcore.utils.interactions.DeleteMessageButton"><code class="docutils literal notranslate"><span class="pre">DeleteMessageButton</span></code></a><ul> +<li><a class="reference internal" href="#botcore.utils.interactions.DeleteMessageButton.__init__"><code class="docutils literal notranslate"><span class="pre">DeleteMessageButton.__init__()</span></code></a></li> +<li><a class="reference internal" href="#botcore.utils.interactions.DeleteMessageButton.callback"><code class="docutils literal notranslate"><span class="pre">DeleteMessageButton.callback()</span></code></a></li> +</ul> +</li> +<li><a class="reference internal" href="#botcore.utils.interactions.ViewWithUserAndRoleCheck"><code class="docutils literal notranslate"><span class="pre">ViewWithUserAndRoleCheck</span></code></a><ul> +<li><a class="reference internal" href="#botcore.utils.interactions.ViewWithUserAndRoleCheck.__init__"><code class="docutils literal notranslate"><span class="pre">ViewWithUserAndRoleCheck.__init__()</span></code></a></li> +<li><a class="reference internal" href="#botcore.utils.interactions.ViewWithUserAndRoleCheck.interaction_check"><code class="docutils literal notranslate"><span class="pre">ViewWithUserAndRoleCheck.interaction_check()</span></code></a></li> +<li><a class="reference internal" href="#botcore.utils.interactions.ViewWithUserAndRoleCheck.on_timeout"><code class="docutils literal notranslate"><span class="pre">ViewWithUserAndRoleCheck.on_timeout()</span></code></a></li> +</ul> +</li> +</ul> +</li> +</ul> + + </div> + </div> + </div> + </aside> </div> @@ -475,6 +508,7 @@ If <code class="docutils literal notranslate"><span class="pre">None</span></cod <script src="../_static/underscore.js"></script> <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="../_static/doctools.js"></script> + <script src="../_static/sphinx_highlight.js"></script> <script src="../_static/scripts/furo.js"></script> <script src="../_static/changelog.js"></script> </body> diff --git a/v8.0.0/output/botcore.utils.logging.html b/v8.0.0/output/botcore.utils.logging.html index e1ed8894..61a5cdf3 100644 --- a/v8.0.0/output/botcore.utils.logging.html +++ b/v8.0.0/output/botcore.utils.logging.html @@ -2,10 +2,10 @@ <html class="no-js" lang="en"> <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.19: https://docutils.sourceforge.io/" /> + <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="interactions" href="botcore.utils.interactions.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-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>logging - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> @@ -138,7 +138,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> @@ -208,6 +208,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../../v8.2.1/output/botcore.utils.logging.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../../v8.2.0/output/botcore.utils.logging.html">v8.2.0</a> </li> @@ -327,7 +331,7 @@ <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> @@ -350,14 +354,14 @@ </pre></div> </div> <dl class="field-list simple"> -<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<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<span class="colon">:</span></dt> +<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> @@ -370,13 +374,13 @@ <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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/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<span class="colon">:</span></dt> +<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<span class="colon">:</span></dt> +<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<span class="colon">:</span></dt> +<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> @@ -429,8 +433,31 @@ </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"> + On this page + </span> + </div> + <div class="toc-tree-container"> + <div class="toc-tree"> + <ul> +<li><a class="reference internal" href="#">logging</a><ul> +<li><a class="reference internal" href="#botcore.utils.logging.CustomLogger"><code class="docutils literal notranslate"><span class="pre">CustomLogger</span></code></a><ul> +<li><a class="reference internal" href="#botcore.utils.logging.CustomLogger.trace"><code class="docutils literal notranslate"><span class="pre">CustomLogger.trace()</span></code></a></li> +</ul> +</li> +<li><a class="reference internal" href="#botcore.utils.logging.get_logger"><code class="docutils literal notranslate"><span class="pre">get_logger()</span></code></a></li> +</ul> +</li> +</ul> + + </div> + </div> + </div> </aside> @@ -440,6 +467,7 @@ <script src="../_static/underscore.js"></script> <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="../_static/doctools.js"></script> + <script src="../_static/sphinx_highlight.js"></script> <script src="../_static/scripts/furo.js"></script> <script src="../_static/changelog.js"></script> </body> diff --git a/v8.0.0/output/botcore.utils.members.html b/v8.0.0/output/botcore.utils.members.html index 8fc4f631..89ecd429 100644 --- a/v8.0.0/output/botcore.utils.members.html +++ b/v8.0.0/output/botcore.utils.members.html @@ -2,10 +2,10 @@ <html class="no-js" lang="en"> <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.19: https://docutils.sourceforge.io/" /> + <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-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>members - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> @@ -138,7 +138,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> @@ -208,6 +208,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../../v8.2.1/output/botcore.utils.members.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../../v8.2.0/output/botcore.utils.members.html">v8.2.0</a> </li> @@ -327,7 +331,7 @@ <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> @@ -341,10 +345,10 @@ <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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/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<span class="colon">:</span></dt> +<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/latest/api.html#discord.Member" title="(in discord.py v2.1.0a)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Member</span></code></a>]</p> </dd> -<dt class="field-even">Returns<span class="colon">:</span></dt> +<dt class="field-even">Returns</dt> <dd class="field-even"><p>The <a class="reference external" href="https://discordpy.readthedocs.io/en/latest/api.html#discord.Member" title="(in discord.py v2.1.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> @@ -357,14 +361,14 @@ <p>Handle errors that we expect to be raised from <a class="reference external" href="https://discordpy.readthedocs.io/en/latest/api.html#discord.Member.add_roles" title="(in discord.py v2.1.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/latest/api.html#discord.Member.remove_roles" title="(in discord.py v2.1.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<span class="colon">:</span></dt> +<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/latest/api.html#discord.Member" title="(in discord.py v2.1.0a)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Member</span></code></a>) – The member that is being modified for logging purposes.</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://discordpy.readthedocs.io/en/latest/api.html#discord.Role" title="(in discord.py v2.1.0a)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Role</span></code></a>], <a class="reference external" href="https://docs.python.org/3/library/collections.abc.html#collections.abc.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/latest/api.html#discord.Member.add_roles" title="(in discord.py v2.1.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/latest/api.html#discord.Member.remove_roles" title="(in discord.py v2.1.0a)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">discord.Member.remove_roles</span></code></a>.</p></li> <li><p><strong>role</strong> (<a class="reference external" href="https://discordpy.readthedocs.io/en/latest/api.html#discord.Role" title="(in discord.py v2.1.0a)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Role</span></code></a>) – The role to be passed to <code class="docutils literal notranslate"><span class="pre">coro</span></code>.</p></li> </ul> </dd> -<dt class="field-even">Return type<span class="colon">:</span></dt> +<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> @@ -417,8 +421,28 @@ </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"> + On this page + </span> + </div> + <div class="toc-tree-container"> + <div class="toc-tree"> + <ul> +<li><a class="reference internal" href="#">members</a><ul> +<li><a class="reference internal" href="#botcore.utils.members.get_or_fetch_member"><code class="docutils literal notranslate"><span class="pre">get_or_fetch_member()</span></code></a></li> +<li><a class="reference internal" href="#botcore.utils.members.handle_role_change"><code class="docutils literal notranslate"><span class="pre">handle_role_change()</span></code></a></li> +</ul> +</li> +</ul> + + </div> + </div> + </div> </aside> @@ -428,6 +452,7 @@ <script src="../_static/underscore.js"></script> <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="../_static/doctools.js"></script> + <script src="../_static/sphinx_highlight.js"></script> <script src="../_static/scripts/furo.js"></script> <script src="../_static/changelog.js"></script> </body> diff --git a/v8.0.0/output/botcore.utils.regex.html b/v8.0.0/output/botcore.utils.regex.html index ac99b4e3..1f0dec99 100644 --- a/v8.0.0/output/botcore.utils.regex.html +++ b/v8.0.0/output/botcore.utils.regex.html @@ -2,10 +2,10 @@ <html class="no-js" lang="en"> <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.19: https://docutils.sourceforge.io/" /> + <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="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-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>regex - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> @@ -138,7 +138,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> @@ -208,6 +208,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../../v8.2.1/output/botcore.utils.regex.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../../v8.2.0/output/botcore.utils.regex.html">v8.2.0</a> </li> @@ -327,7 +331,7 @@ <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> @@ -413,8 +417,29 @@ such as <a class="reference external" href="https://docs.python.org/3/library/ur </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"> + On this page + </span> + </div> + <div class="toc-tree-container"> + <div class="toc-tree"> + <ul> +<li><a class="reference internal" href="#">regex</a><ul> +<li><a class="reference internal" href="#botcore.utils.regex.DISCORD_INVITE"><code class="docutils literal notranslate"><span class="pre">DISCORD_INVITE</span></code></a></li> +<li><a class="reference internal" href="#botcore.utils.regex.FORMATTED_CODE_REGEX"><code class="docutils literal notranslate"><span class="pre">FORMATTED_CODE_REGEX</span></code></a></li> +<li><a class="reference internal" href="#botcore.utils.regex.RAW_CODE_REGEX"><code class="docutils literal notranslate"><span class="pre">RAW_CODE_REGEX</span></code></a></li> +</ul> +</li> +</ul> + + </div> + </div> + </div> </aside> @@ -424,6 +449,7 @@ such as <a class="reference external" href="https://docs.python.org/3/library/ur <script src="../_static/underscore.js"></script> <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="../_static/doctools.js"></script> + <script src="../_static/sphinx_highlight.js"></script> <script src="../_static/scripts/furo.js"></script> <script src="../_static/changelog.js"></script> </body> diff --git a/v8.0.0/output/botcore.utils.scheduling.html b/v8.0.0/output/botcore.utils.scheduling.html index 6d6c938a..ce7ccd95 100644 --- a/v8.0.0/output/botcore.utils.scheduling.html +++ b/v8.0.0/output/botcore.utils.scheduling.html @@ -2,10 +2,10 @@ <html class="no-js" lang="en"> <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.19: https://docutils.sourceforge.io/" /> + <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="async_stats" href="botcore.async_stats.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-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>scheduling - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> @@ -138,7 +138,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> @@ -208,6 +208,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../../v8.2.1/output/botcore.utils.scheduling.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../../v8.2.0/output/botcore.utils.scheduling.html">v8.2.0</a> </li> @@ -327,7 +331,7 @@ <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> @@ -355,13 +359,13 @@ the same ID used to schedule it.</p> <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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/utils/scheduling.py#L44-L55"><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<span class="colon">:</span></dt> +<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/collections.abc.html#collections.abc.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<span class="colon">:</span></dt> +<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<span class="colon">:</span></dt> +<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> @@ -372,7 +376,7 @@ the same ID used to schedule it.</p> <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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/utils/scheduling.py#L32-L43"><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<span class="colon">:</span></dt> +<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> @@ -383,10 +387,10 @@ the same ID used to schedule it.</p> <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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/utils/scheduling.py#L126-L143"><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<span class="colon">:</span></dt> +<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/collections.abc.html#collections.abc.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<span class="colon">:</span></dt> +<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> @@ -397,7 +401,7 @@ the same ID used to schedule it.</p> <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/db0ff48a574f5b466f3e8dc25cc32c3a9bfc1370/botcore/utils/scheduling.py#L144-L150"><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<span class="colon">:</span></dt> +<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> @@ -410,13 +414,13 @@ the same ID used to schedule it.</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<span class="colon">:</span></dt> +<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/collections.abc.html#collections.abc.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/collections.abc.html#collections.abc.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<span class="colon">:</span></dt> +<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> @@ -432,14 +436,14 @@ If <code class="docutils literal notranslate"><span class="pre">time</span></cod <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<span class="colon">:</span></dt> +<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/collections.abc.html#collections.abc.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/collections.abc.html#collections.abc.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<span class="colon">:</span></dt> +<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> @@ -452,14 +456,14 @@ prevents unawaited coroutine warnings. Don’t pass a coroutine that’ll be re- <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<span class="colon">:</span></dt> +<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/collections.abc.html#collections.abc.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/collections.abc.html#collections.abc.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<span class="colon">:</span></dt> +<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> @@ -474,7 +478,7 @@ prevents unawaited coroutine warnings. Don’t pass a coroutine that’ll be re- <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<span class="colon">:</span></dt> +<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/collections.abc.html#collections.abc.Coroutine" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Coroutine</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.10)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Any</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.10)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Any</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.TypeVar" title="(in Python v3.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">TypeVar</span></code></a>(<code class="docutils literal notranslate"><span class="pre">TASK_RETURN</span></code>)]) – 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/functions.html#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>], <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>]) – Exceptions to be handled by the task.</p></li> @@ -482,10 +486,10 @@ otherwise the running loop is used.</p> <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<span class="colon">:</span></dt> +<dt class="field-even">Returns</dt> <dd class="field-even"><p>The wrapped task.</p> </dd> -<dt class="field-odd">Return type<span class="colon">:</span></dt> +<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> @@ -538,8 +542,37 @@ otherwise the running loop is used.</p> </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"> + On this page + </span> + </div> + <div class="toc-tree-container"> + <div class="toc-tree"> + <ul> +<li><a class="reference internal" href="#">scheduling</a><ul> +<li><a class="reference internal" href="#botcore.utils.scheduling.Scheduler"><code class="docutils literal notranslate"><span class="pre">Scheduler</span></code></a><ul> +<li><a class="reference internal" href="#botcore.utils.scheduling.Scheduler.__contains__"><code class="docutils literal notranslate"><span class="pre">Scheduler.__contains__()</span></code></a></li> +<li><a class="reference internal" href="#botcore.utils.scheduling.Scheduler.__init__"><code class="docutils literal notranslate"><span class="pre">Scheduler.__init__()</span></code></a></li> +<li><a class="reference internal" href="#botcore.utils.scheduling.Scheduler.cancel"><code class="docutils literal notranslate"><span class="pre">Scheduler.cancel()</span></code></a></li> +<li><a class="reference internal" href="#botcore.utils.scheduling.Scheduler.cancel_all"><code class="docutils literal notranslate"><span class="pre">Scheduler.cancel_all()</span></code></a></li> +<li><a class="reference internal" href="#botcore.utils.scheduling.Scheduler.schedule"><code class="docutils literal notranslate"><span class="pre">Scheduler.schedule()</span></code></a></li> +<li><a class="reference internal" href="#botcore.utils.scheduling.Scheduler.schedule_at"><code class="docutils literal notranslate"><span class="pre">Scheduler.schedule_at()</span></code></a></li> +<li><a class="reference internal" href="#botcore.utils.scheduling.Scheduler.schedule_later"><code class="docutils literal notranslate"><span class="pre">Scheduler.schedule_later()</span></code></a></li> +</ul> +</li> +<li><a class="reference internal" href="#botcore.utils.scheduling.create_task"><code class="docutils literal notranslate"><span class="pre">create_task()</span></code></a></li> +</ul> +</li> +</ul> + + </div> + </div> + </div> </aside> @@ -549,6 +582,7 @@ otherwise the running loop is used.</p> <script src="../_static/underscore.js"></script> <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="../_static/doctools.js"></script> + <script src="../_static/sphinx_highlight.js"></script> <script src="../_static/scripts/furo.js"></script> <script src="../_static/changelog.js"></script> </body> diff --git a/v8.0.0/py-modindex.html b/v8.0.0/py-modindex.html index ca1d25aa..50563b4e 100644 --- a/v8.0.0/py-modindex.html +++ b/v8.0.0/py-modindex.html @@ -4,7 +4,7 @@ <meta name="viewport" content="width=device-width,initial-scale=1"/> <meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /> - <link rel="shortcut icon" href="https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_full/logo_full.min.svg"/><meta name="generator" content="sphinx-5.1.1, furo 2022.09.15"/><title>Python Module Index - Bot Core v8.0.0</title> + <link rel="shortcut icon" href="https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_full/logo_full.min.svg"/><meta name="generator" content="sphinx-5.2.2, furo 2022.09.15"/><title>Python Module Index - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" /> @@ -206,6 +206,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../v8.2.1/index.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../v8.2.0/index.html">v8.2.0</a> </li> @@ -462,6 +466,7 @@ <script src="_static/underscore.js"></script> <script src="_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="_static/doctools.js"></script> + <script src="_static/sphinx_highlight.js"></script> <script src="_static/scripts/furo.js"></script> <script src="_static/changelog.js"></script> </body> diff --git a/v8.0.0/search.html b/v8.0.0/search.html index a57d068e..a2c6bf3c 100644 --- a/v8.0.0/search.html +++ b/v8.0.0/search.html @@ -4,7 +4,7 @@ <meta name="viewport" content="width=device-width,initial-scale=1"/> <meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="#" /> - <link rel="shortcut icon" href="https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_full/logo_full.min.svg"/><meta name="generator" content="sphinx-5.1.1, furo 2022.09.15"/><title>Search - Bot Core v8.0.0</title><link rel="stylesheet" type="text/css" href="_static/pygments.css" /> + <link rel="shortcut icon" href="https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_full/logo_full.min.svg"/><meta name="generator" content="sphinx-5.2.2, furo 2022.09.15"/><title>Search - Bot Core v8.0.0</title><link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" /> <link rel="stylesheet" type="text/css" href="_static/logo.css" /> @@ -205,6 +205,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../v8.2.1/index.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../v8.2.0/index.html">v8.2.0</a> </li> @@ -380,6 +384,7 @@ <script src="_static/underscore.js"></script> <script src="_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="_static/doctools.js"></script> + <script src="_static/sphinx_highlight.js"></script> <script src="_static/scripts/furo.js"></script> <script src="_static/changelog.js"></script> diff --git a/v8.0.0/searchindex.js b/v8.0.0/searchindex.js index 308f18ea..7eb0adad 100644 --- a/v8.0.0/searchindex.js +++ b/v8.0.0/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["changelog", "development", "index", "output/botcore", "output/botcore.async_stats", "output/botcore.exts", "output/botcore.site_api", "output/botcore.utils", "output/botcore.utils.caching", "output/botcore.utils.channel", "output/botcore.utils.commands", "output/botcore.utils.interactions", "output/botcore.utils.logging", "output/botcore.utils.members", "output/botcore.utils.regex", "output/botcore.utils.scheduling"], "filenames": ["changelog.rst", "development.rst", "index.rst", "output/botcore.rst", "output/botcore.async_stats.rst", "output/botcore.exts.rst", "output/botcore.site_api.rst", "output/botcore.utils.rst", "output/botcore.utils.caching.rst", "output/botcore.utils.channel.rst", "output/botcore.utils.commands.rst", "output/botcore.utils.interactions.rst", "output/botcore.utils.logging.rst", "output/botcore.utils.members.rst", "output/botcore.utils.regex.rst", "output/botcore.utils.scheduling.rst"], "titles": ["Changelog", "Local Development & Testing", "Bot Core Project Documentation", "Botcore", "async_stats", "Exts", "site_api", "Utils", "caching", "channel", "commands", "interactions", "logging", "members", "regex", "scheduling"], "terms": {"8": 0, "0": [0, 8, 11, 12], "27th": 0, "juli": 0, "2022": 0, "break": 0, "110": 0, "bump": 0, "async": [0, 3, 4, 6, 8, 9, 10, 11, 13], "rediscach": 0, "v1": 0, "rc2": 0, "bug": 0, "107": 0, "declar": 0, "aiodn": 0, "project": [0, 1], "depend": [0, 9], "support": [0, 4, 7, 15], "add": [0, 3], "sampl": 0, "boilerpl": 0, "document": 0, "explain": 0, "how": [0, 8, 15], "develop": [0, 2, 3, 7], "bot": [0, 1, 3, 7, 9], "core": [0, 1], "108": 0, "python": [0, 1, 3, 15], "version": [0, 10], "3": 0, "10": 0, "7": 0, "5": 0, "23rd": 0, "featur": [0, 1, 3], "101": 0, "util": [0, 1, 2, 3, 8, 11, 12], "clean": [0, 10], "string": [0, 6], "referenc": 0, "messag": [0, 3, 10, 11, 12, 15], "": [0, 1, 7, 8, 10, 11, 12, 14, 15], "content": [0, 6, 10], "4": 0, "17th": 0, "106": 0, "an": [0, 1, 3, 4, 6, 7, 8, 9, 12, 15], "option": [0, 3, 4, 6, 8, 10, 11, 12, 13], "attr": 0, "botcor": [0, 1, 2, 11], "interact": [0, 3, 7, 9], "viewwithuserandrolecheck": [0, 11], "On": 0, "view": [0, 11], "timeout": [0, 11], "thi": [0, 1, 3, 7, 9, 11, 13, 14, 15], "ha": [0, 7], "its": [0, 3], "remov": [0, 3, 11], "set": [0, 1, 3, 11], "1": [0, 12], "16th": 0, "104": 0, "fix": 0, "deletemessagebutton": [0, 11], "work": [0, 1], "due": 0, "us": [0, 1, 3, 4, 6, 7, 9, 12, 13, 14, 15], "wrong": 0, "delet": [0, 6, 8, 11], "method": [0, 4, 6, 7, 12], "103": 0, "button": [0, 11], "attach": 0, "parent": [0, 11], "gener": [0, 3, 15], "onli": [0, 3], "allow": [0, 1, 3, 11], "specifi": [0, 11], "user": [0, 11], "role": [0, 1, 3, 11, 13], "2": [0, 3, 11], "9th": 0, "98": 0, "close": [0, 3, 6, 15], "botbas": [0, 3], "stat": [0, 4], "_transport": 0, "wa": [0, 9, 15], "creat": [0, 3, 4, 8, 15], "30th": 0, "june": 0, "91": 0, "miss": 0, "await": [0, 11, 13], "ping_servic": [0, 3], "some": 0, "case": 0, "pass": [0, 6, 12, 13, 15], "self": [0, 3, 11], "paramet": [0, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 15], "incorrect": 0, "docstr": 0, "member": [0, 3, 7], "handle_role_chang": [0, 13], "96": 0, "attempt": [0, 3, 9, 13], "connect": [0, 3, 4], "statsd_url": [0, 3], "when": [0, 3, 4, 6, 7, 8, 15], "i": [0, 1, 3, 6, 7, 9, 11, 12, 13, 15], "none": [0, 3, 4, 6, 7, 8, 10, 11, 12, 13, 15], "28th": 0, "93": 0, "discord": [0, 1, 3, 5, 7, 9, 10, 13, 14], "py": 0, "0eb3d26": 0, "auto": 0, "mod": 0, "which": [0, 1, 7, 15], "new": [0, 1, 4, 6, 8, 15], "auto_mod": 0, "message_typ": 0, "need": [0, 1], "our": [0, 1, 7], "filter": 0, "system": [0, 1], "mai": [0, 8], "79": 0, "restor": 0, "site": [0, 6], "sphinx": 0, "multivers": 0, "make": [0, 1, 12], "avail": [0, 3], "older": 0, "doc": 0, "24th": 0, "78": 0, "4cbe8f5": 0, "permiss": [0, 9], "resolut": 0, "deal": 0, "time": [0, 15], "out": [0, 1, 11], "10th": 0, "75": 0, "invit": [0, 14], "regex": [0, 3, 7], "longer": [0, 11], "return": [0, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 15], "url": [0, 3, 6], "safe": 0, "result": [0, 15], "refer": 0, "handl": [0, 13, 15], "captur": [0, 14], "all": [0, 1, 3, 4, 7, 15], "charact": 0, "up": [0, 1, 3], "whitespac": [0, 14], "6": 0, "26th": 0, "april": 0, "72": 0, "5a06fa5": 0, "notabl": 0, "one": [0, 3], "commit": 0, "dynam": 0, "extend": 0, "guild": [0, 1, 3, 13], "chunk": 0, "base": [0, 3, 4, 6, 8, 11, 12, 15], "number": 0, "so": [0, 1, 7], "should": [0, 1, 3, 6, 11], "actual": 0, "now": [0, 1, 15], "25th": 0, "69": 0, "get": [0, 6, 9, 13], "21st": 0, "68": 0, "correct": [0, 1], "pyproject": [0, 1], "toml": [0, 1], "directli": 0, "main": 0, "don": [0, 15], "t": [0, 10, 15], "load": [0, 1, 3, 7], "modul": [0, 3, 7, 15], "start": [0, 3, 15], "_": 0, "66": 0, "each": 0, "cog": [0, 3, 5], "own": 0, "task": [0, 3, 15], "avoid": [0, 3], "singl": 0, "crash": 0, "entir": [0, 3], "process": 0, "20th": 0, "65": 0, "unqualifi": [0, 7], "namespac": [0, 15], "manipul": 0, "extens": [0, 3], "19th": 0, "64": 0, "987235d": 0, "revert": 0, "chang": [0, 1], "help": [0, 1], "command": [0, 1, 3, 7, 9], "behaviour": 0, "broke": 0, "custom": [0, 8, 12], "pagin": 0, "also": [0, 7, 11], "basic": [0, 11], "forum": 0, "channel": [0, 3, 7], "18th": 0, "63": 0, "api_cli": [0, 3], "__init__": [0, 3, 4, 6, 8, 11, 15], "site_api": [0, 2, 3], "apicli": [0, 3, 6], "instanc": [0, 3, 6, 8, 9, 12, 15], "61": 0, "reconnect": 0, "redi": 0, "session": [0, 3, 6], "setup": [0, 3], "5th": 0, "56": 0, "move": 0, "creation": 0, "asyncio": [0, 4, 15], "event": [0, 3, 4, 15], "_guild_avail": 0, "within": [0, 3], "hook": 0, "deprec": 0, "notic": 0, "dummi": [0, 3], "asyncstatsdcli": 0, "befor": [0, 3, 11, 15], "real": 0, "cannot": [0, 3], "made": 0, "init": [0, 3, 4], "2nd": 0, "54": 0, "aiohttp": [0, 3, 6], "asyncresolv": 0, "42": 0, "public": 0, "statsd": [0, 3, 4], "client": [0, 3, 4], "ext": [0, 2, 3, 7, 9, 10], "sub": [0, 3], "class": [0, 3, 4, 6, 8, 11, 12, 15], "abstract": 0, "lot": 0, "logic": 0, "share": 0, "between": [0, 1], "latest": 0, "alpha": 0, "14th": 0, "march": 0, "39": 0, "migrat": 0, "back": 0, "37": 0, "log": [0, 3, 7, 13, 15], "trace": [0, 12], "import": 0, "can": [0, 1, 11, 15], "function": [0, 3, 8, 9, 12, 13, 15], "3rd": 0, "35": 0, "apply_monkey_patch": [0, 7], "februari": 0, "34": 0, "port": [0, 4], "api": [0, 6, 13], "wrapper": [0, 6, 15], "from": [0, 1, 3, 4, 6, 7, 9, 11, 13, 15], "repo": 0, "22nd": 0, "32": 0, "0a0": 0, "disnak": 0, "29": 0, "mani": [0, 3, 8], "common": [0, 1, 3, 7, 12, 14], "cach": [0, 3, 7, 9, 13], "logger": [0, 12], "schedul": [0, 3, 7], "monkei": [0, 7], "patch": [0, 6, 7], "ad": [0, 1, 7, 11, 12], "intersphinx": 0, "januari": 0, "12": 0, "code": [0, 1, 14], "block": [0, 14], "detect": 0, "decemb": 0, "2021": 0, "autogener": 0, "novemb": 0, "packag": [0, 7], "poetri": [0, 1], "lint": 0, "ci": 0, "To": [1, 3, 12], "your": 1, "ar": [1, 3, 8, 11, 14], "few": 1, "possibl": 1, "approach": 1, "instal": 1, "copi": 1, "pre": 1, "exist": [1, 15], "provid": [1, 8, 10, 15], "templat": 1, "dev": [1, 3], "folder": 1, "see": [1, 11], "below": 1, "more": 1, "info": 1, "both": 1, "what": 1, "go": 1, "them": [1, 3, 15], "you": [1, 9, 14], "ll": [1, 15], "write": 1, "might": 1, "mean": 1, "modifi": [1, 13], "ones": 1, "etc": 1, "The": [1, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 15], "step": 1, "most": 1, "groundwork": 1, "exact": 1, "requir": [1, 3, 15], "vari": 1, "re": [1, 3, 15], "navig": 1, "want": 1, "sir": 1, "lancebot": 1, "run": [1, 15], "pip": 1, "path": 1, "environ": 1, "root": [1, 3, 7], "directori": 1, "machin": 1, "That": 1, "contain": [1, 11, 15], "file": 1, "sure": 1, "again": 1, "git": 1, "ignor": [1, 7], "free": 1, "howev": 1, "like": 1, "m": 1, "docker": 1, "compos": 1, "d": 1, "configur": 1, "variabl": 1, "program": 1, "env": 1, "token": [1, 6], "intent": 1, "enabl": 1, "guild_id": [1, 3], "monitor": 1, "prefix": [1, 4], "invok": [1, 11], "default": 1, "mention": [1, 3], "allowed_rol": [1, 3, 11], "A": [1, 3, 6, 7, 8, 9, 11, 15], "comma": 1, "seper": 1, "list": [1, 3], "id": [1, 3, 9, 11, 15], "do": [1, 9], "anyth": 1, "reinstal": 1, "librari": 1, "includ": 1, "servic": [1, 3], "other": [1, 15], "applic": 1, "certain": 1, "subpackag": 2, "submodul": 2, "async_stat": [2, 3], "index": 2, "search": 2, "page": 2, "inform": [2, 12], "local": 2, "test": 2, "changelog": 2, "tool": [3, 7], "arg": [3, 12], "http_session": 3, "redis_sess": 3, "kwarg": [3, 6, 11, 12, 15], "sourc": [3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], "implement": [3, 4, 8, 11, 12], "initialis": [3, 8], "int": [3, 4, 8, 9, 11, 15], "wait_until_guild_avail": 3, "clientsess": [3, 6], "redissess": 3, "async_rediscach": 3, "str": [3, 4, 6, 7, 10, 11, 12, 15], "server": [3, 14], "If": [3, 6, 11, 15], "given": [3, 4, 7, 9, 10, 12, 13, 15], "add_cog": 3, "oper": [3, 15], "type": [3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 15], "add_command": 3, "normal": 3, "alias": [3, 7], "clear": [3, 8], "Not": 3, "instanti": [3, 11, 15], "instead": [3, 15], "connector": 3, "resolv": 3, "load_extens": 3, "save": 3, "all_extens": 3, "ran": 3, "loop": [3, 4, 15], "deadlock": 3, "caus": [3, 7], "wait_for": 3, "call": [3, 15], "log_to_dev_log": 3, "on_guild_avail": 3, "intern": [3, 7], "becom": 3, "appear": 3, "still": 3, "empti": 3, "guild_available_but_cache_empti": 3, "emit": 3, "on_guild_unavail": 3, "unavail": 3, "ping": 3, "ensur": [3, 11, 14], "thei": 3, "remove_command": 3, "name": [3, 7, 12, 15], "alia": [3, 7], "individu": 3, "either": 3, "manual": 3, "edit": 3, "all_command": 3, "setup_hook": 3, "startup": 3, "asyncstatscli": [3, 4], "create_socket": [3, 4], "wait": [3, 15], "until": [3, 14], "match": 3, "readi": 3, "on_readi": 3, "inadequ": 3, "becaus": 3, "second": [3, 11, 15], "guild_creat": 3, "gatewai": 3, "give": 3, "thu": 3, "popul": 3, "except": [3, 6, 12, 15], "startuperror": 3, "error": [3, 6, 7, 13], "transport": 4, "commun": 4, "host": 4, "localhost": 4, "8125": 4, "statsclientbas": 4, "abstracteventloop": [4, 15], "create_datagram_endpoint": 4, "socket": 4, "reusabl": 5, "around": 6, "site_api_url": 6, "site_api_token": 6, "session_kwarg": 6, "object": [6, 7, 8, 9, 13, 15], "django": 6, "initi": [6, 15], "authent": 6, "keyword": [6, 7, 12], "argument": [6, 7, 8, 10, 12, 13], "constructor": 6, "endpoint": 6, "raise_for_statu": 6, "true": [6, 12, 15], "send": [6, 11], "request": [6, 14], "json": 6, "respons": 6, "bool": [6, 9, 11, 15], "whether": [6, 9], "rais": [6, 9, 10, 13, 15], "ok": 6, "ani": [6, 14, 15], "extra": 6, "dict": 6, "204": 6, "No": 6, "equival": 6, "static": 6, "maybe_raise_for_statu": 6, "should_rais": 6, "responsecodeerror": 6, "non": 6, "clientrespons": 6, "check": [6, 9, 11, 15], "post": 6, "put": 6, "http": [6, 14], "response_json": 6, "response_text": 6, "valueerror": 6, "receiv": [6, 9], "text": [6, 10], "__str__": 6, "represent": 6, "appli": [7, 8], "group": [7, 14], "root_alias": 7, "two": 7, "sequenc": [7, 11], "act": 7, "top": 7, "level": [7, 12], "rather": 7, "than": 7, "being": [7, 13], "It": 7, "store": [7, 8], "attribut": 7, "send_typ": 7, "403": 7, "under": 7, "heavi": 7, "cloudflar": 7, "worker": 7, "rout": 7, "thrown": 7, "qualifi": 7, "relat": [8, 12], "asynccach": 8, "max_siz": 8, "128": 8, "lru": 8, "coroutin": [8, 13, 15], "onc": 8, "exce": 8, "maximum": 8, "size": 8, "kei": 8, "fifo": 8, "order": [8, 15], "offset": 8, "__call__": 8, "arg_offset": 8, "decor": 8, "posit": 8, "callabl": [8, 13], "wrap": [8, 15], "target": 8, "item": 8, "helper": [9, 13], "variou": 9, "get_or_fetch_channel": 9, "channel_id": 9, "fetch": [9, 13], "invaliddata": 9, "unknown": 9, "httpexcept": 9, "retriev": 9, "fail": 9, "notfound": 9, "invalid": 9, "forbidden": 9, "have": [9, 12], "guildchannel": 9, "is_in_categori": 9, "category_id": 9, "categori": 9, "textchannel": 9, "clean_text_or_repli": 10, "ctx": [10, 11], "repli": 10, "context": 10, "badargu": 10, "wasn": 10, "els": 10, "style": 11, "buttonstyl": 11, "secondari": 11, "label": 11, "click": 11, "itself": 11, "carri": 11, "done": [11, 15], "callback": 11, "origin": 11, "allowed_us": 11, "180": 11, "moder": 11, "who": 11, "float": [11, 15], "last": 11, "ui": 11, "accept": 11, "input": 11, "similar": [11, 14], "after": [11, 15], "interaction_check": 11, "occur": 11, "on_timeout": 11, "customlogg": 12, "msg": 12, "sever": 12, "exc_info": 12, "valu": 12, "houston": 12, "we": [12, 13], "interest": 12, "problem": 12, "get_logg": 12, "mypi": 12, "recognis": 12, "interactin": 13, "get_or_fetch_memb": 13, "member_id": 13, "failur": 13, "indic": 13, "could": 13, "found": [13, 15], "coro": [13, 15], "sole": 13, "expect": 13, "add_rol": 13, "remove_rol": 13, "purpos": 13, "intend": 13, "regular": 14, "express": 14, "discord_invit": 14, "pattern": 14, "pleas": 14, "sanitis": 14, "output": 14, "someth": 14, "urllib": 14, "pars": 14, "quot": 14, "formatted_code_regex": 14, "format": 14, "raw_code_regex": 14, "raw": 14, "execut": 15, "keep": 15, "track": 15, "must": 15, "distinguish": 15, "suggest": 15, "immedi": 15, "futur": 15, "schedule_at": 15, "schedule_lat": 15, "uniqu": 15, "cancel": 15, "prematur": 15, "same": 15, "current": 15, "__contains__": 15, "task_id": 15, "hashabl": 15, "look": 15, "unschedul": 15, "identifi": 15, "warn": 15, "doesn": 15, "cancel_al": 15, "known": 15, "alreadi": 15, "prevent": 15, "unawait": 15, "elsewher": 15, "timezon": 15, "awar": 15, "calcul": 15, "subtract": 15, "na\u00efv": 15, "utc": 15, "past": 15, "datetim": 15, "delai": 15, "union": 15, "long": 15, "create_task": 15, "suppressed_except": 15, "event_loop": 15, "otherwis": 15, "typevar": 15, "task_return": 15, "tupl": 15}, "objects": {"": [[3, 0, 0, "-", "botcore"]], "botcore": [[3, 1, 1, "", "BotBase"], [3, 3, 1, "", "StartupError"], [4, 0, 0, "-", "async_stats"], [5, 0, 0, "-", "exts"], [6, 0, 0, "-", "site_api"], [7, 0, 0, "-", "utils"]], "botcore.BotBase": [[3, 2, 1, "", "__init__"], [3, 2, 1, "", "add_cog"], [3, 2, 1, "", "add_command"], [3, 2, 1, "", "clear"], [3, 2, 1, "", "close"], [3, 2, 1, "", "load_extensions"], [3, 2, 1, "", "log_to_dev_log"], [3, 2, 1, "", "on_guild_available"], [3, 2, 1, "", "on_guild_unavailable"], [3, 2, 1, "", "ping_services"], [3, 2, 1, "", "remove_command"], [3, 2, 1, "", "setup_hook"], [3, 2, 1, "", "wait_until_guild_available"]], "botcore.StartupError": [[3, 2, 1, "", "__init__"]], "botcore.async_stats": [[4, 1, 1, "", "AsyncStatsClient"]], "botcore.async_stats.AsyncStatsClient": [[4, 2, 1, "", "__init__"], [4, 2, 1, "", "create_socket"]], "botcore.site_api": [[6, 1, 1, "", "APIClient"], [6, 3, 1, "", "ResponseCodeError"]], "botcore.site_api.APIClient": [[6, 2, 1, "", "__init__"], [6, 2, 1, "", "close"], [6, 2, 1, "", "delete"], [6, 2, 1, "", "get"], [6, 2, 1, "", "maybe_raise_for_status"], [6, 2, 1, "", "patch"], [6, 2, 1, "", "post"], [6, 2, 1, "", "put"], [6, 2, 1, "", "request"]], "botcore.site_api.ResponseCodeError": [[6, 2, 1, "", "__init__"], [6, 2, 1, "", "__str__"]], "botcore.utils": [[7, 4, 1, "", "apply_monkey_patches"], [8, 0, 0, "-", "caching"], [9, 0, 0, "-", "channel"], [10, 0, 0, "-", "commands"], [11, 0, 0, "-", "interactions"], [12, 0, 0, "-", "logging"], [13, 0, 0, "-", "members"], [14, 0, 0, "-", "regex"], [15, 0, 0, "-", "scheduling"], [7, 4, 1, "", "unqualify"]], "botcore.utils.caching": [[8, 1, 1, "", "AsyncCache"]], "botcore.utils.caching.AsyncCache": [[8, 2, 1, "", "__call__"], [8, 2, 1, "", "__init__"], [8, 2, 1, "", "clear"]], "botcore.utils.channel": [[9, 4, 1, "", "get_or_fetch_channel"], [9, 4, 1, "", "is_in_category"]], "botcore.utils.commands": [[10, 4, 1, "", "clean_text_or_reply"]], "botcore.utils.interactions": [[11, 1, 1, "", "DeleteMessageButton"], [11, 1, 1, "", "ViewWithUserAndRoleCheck"]], "botcore.utils.interactions.DeleteMessageButton": [[11, 2, 1, "", "__init__"], [11, 2, 1, "", "callback"]], "botcore.utils.interactions.ViewWithUserAndRoleCheck": [[11, 2, 1, "", "__init__"], [11, 2, 1, "", "interaction_check"], [11, 2, 1, "", "on_timeout"]], "botcore.utils.logging": [[12, 1, 1, "", "CustomLogger"], [12, 4, 1, "", "get_logger"]], "botcore.utils.logging.CustomLogger": [[12, 2, 1, "", "trace"]], "botcore.utils.members": [[13, 4, 1, "", "get_or_fetch_member"], [13, 4, 1, "", "handle_role_change"]], "botcore.utils.regex": [[14, 5, 1, "", "DISCORD_INVITE"], [14, 5, 1, "", "FORMATTED_CODE_REGEX"], [14, 5, 1, "", "RAW_CODE_REGEX"]], "botcore.utils.scheduling": [[15, 1, 1, "", "Scheduler"], [15, 4, 1, "", "create_task"]], "botcore.utils.scheduling.Scheduler": [[15, 2, 1, "", "__contains__"], [15, 2, 1, "", "__init__"], [15, 2, 1, "", "cancel"], [15, 2, 1, "", "cancel_all"], [15, 2, 1, "", "schedule"], [15, 2, 1, "", "schedule_at"], [15, 2, 1, "", "schedule_later"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:exception", "4": "py:function", "5": "py:data"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "exception", "Python exception"], "4": ["py", "function", "Python function"], "5": ["py", "data", "Python data"]}, "titleterms": {"changelog": 0, "local": 1, "develop": 1, "test": 1, "option": 1, "1": 1, "2": 1, "bot": 2, "core": 2, "project": 2, "document": 2, "refer": 2, "modul": 2, "extra": 2, "botcor": 3, "subpackag": 3, "submodul": [3, 7], "async_stat": 4, "ext": 5, "site_api": 6, "util": 7, "cach": 8, "channel": 9, "command": 10, "interact": 11, "log": 12, "member": 13, "regex": 14, "schedul": 15}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "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}})
\ No newline at end of file +Search.setIndex({"docnames": ["changelog", "development", "index", "output/botcore", "output/botcore.async_stats", "output/botcore.exts", "output/botcore.site_api", "output/botcore.utils", "output/botcore.utils.caching", "output/botcore.utils.channel", "output/botcore.utils.commands", "output/botcore.utils.interactions", "output/botcore.utils.logging", "output/botcore.utils.members", "output/botcore.utils.regex", "output/botcore.utils.scheduling"], "filenames": ["changelog.rst", "development.rst", "index.rst", "output/botcore.rst", "output/botcore.async_stats.rst", "output/botcore.exts.rst", "output/botcore.site_api.rst", "output/botcore.utils.rst", "output/botcore.utils.caching.rst", "output/botcore.utils.channel.rst", "output/botcore.utils.commands.rst", "output/botcore.utils.interactions.rst", "output/botcore.utils.logging.rst", "output/botcore.utils.members.rst", "output/botcore.utils.regex.rst", "output/botcore.utils.scheduling.rst"], "titles": ["Changelog", "Local Development & Testing", "Bot Core Project Documentation", "Botcore", "async_stats", "Exts", "site_api", "Utils", "caching", "channel", "commands", "interactions", "logging", "members", "regex", "scheduling"], "terms": {"8": 0, "0": [0, 8, 11, 12], "27th": 0, "juli": 0, "2022": 0, "break": 0, "110": 0, "bump": 0, "async": [0, 3, 4, 6, 8, 9, 10, 11, 13], "rediscach": 0, "v1": 0, "rc2": 0, "bug": 0, "107": 0, "declar": 0, "aiodn": 0, "project": [0, 1], "depend": [0, 9], "support": [0, 4, 7, 15], "add": [0, 3], "sampl": 0, "boilerpl": 0, "document": 0, "explain": 0, "how": [0, 8, 15], "develop": [0, 2, 3, 7], "bot": [0, 1, 3, 7, 9], "core": [0, 1], "108": 0, "python": [0, 1, 3, 15], "version": [0, 10], "3": 0, "10": 0, "7": 0, "5": 0, "23rd": 0, "featur": [0, 1, 3], "101": 0, "util": [0, 1, 2, 3, 8, 11, 12], "clean": [0, 10], "string": [0, 6], "referenc": 0, "messag": [0, 3, 10, 11, 12, 15], "": [0, 1, 7, 8, 10, 11, 12, 14, 15], "content": [0, 6, 10], "4": 0, "17th": 0, "106": 0, "an": [0, 1, 3, 4, 6, 7, 8, 9, 12, 15], "option": [0, 3, 4, 6, 8, 10, 11, 12, 13], "attr": 0, "botcor": [0, 1, 2, 11], "interact": [0, 3, 7, 9], "viewwithuserandrolecheck": [0, 3, 7, 11], "On": 0, "view": [0, 11], "timeout": [0, 11], "thi": [0, 1, 3, 7, 9, 11, 13, 14, 15], "ha": [0, 7], "its": [0, 3], "remov": [0, 3, 11], "set": [0, 1, 3, 11], "1": [0, 12], "16th": 0, "104": 0, "fix": 0, "deletemessagebutton": [0, 3, 7, 11], "work": [0, 1], "due": 0, "us": [0, 1, 3, 4, 6, 7, 9, 12, 13, 14, 15], "wrong": 0, "delet": [0, 3, 6, 8, 11], "method": [0, 4, 6, 7, 12], "103": 0, "button": [0, 11], "attach": 0, "parent": [0, 11], "gener": [0, 3, 15], "onli": [0, 3], "allow": [0, 1, 3, 11], "specifi": [0, 11], "user": [0, 11], "role": [0, 1, 3, 11, 13], "2": [0, 3, 11], "9th": 0, "98": 0, "close": [0, 2, 3, 6, 15], "botbas": [0, 2, 3], "stat": [0, 4], "_transport": 0, "wa": [0, 9, 15], "creat": [0, 3, 4, 8, 15], "30th": 0, "june": 0, "91": 0, "miss": 0, "await": [0, 11, 13], "ping_servic": [0, 2, 3], "some": 0, "case": 0, "pass": [0, 6, 12, 13, 15], "self": [0, 3, 11], "paramet": [0, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 15], "incorrect": 0, "docstr": 0, "member": [0, 3, 7], "handle_role_chang": [0, 3, 7, 13], "96": 0, "attempt": [0, 3, 9, 13], "connect": [0, 3, 4], "statsd_url": [0, 3], "when": [0, 3, 4, 6, 7, 8, 15], "i": [0, 1, 3, 6, 7, 9, 11, 12, 13, 15], "none": [0, 3, 4, 6, 7, 8, 10, 11, 12, 13, 15], "28th": 0, "93": 0, "discord": [0, 1, 3, 5, 7, 9, 10, 13, 14], "py": 0, "0eb3d26": 0, "auto": 0, "mod": 0, "which": [0, 1, 7, 15], "new": [0, 1, 4, 6, 8, 15], "auto_mod": 0, "message_typ": 0, "need": [0, 1], "our": [0, 1, 7], "filter": 0, "system": [0, 1], "mai": [0, 8], "79": 0, "restor": 0, "site": [0, 6], "sphinx": 0, "multivers": 0, "make": [0, 1, 12], "avail": [0, 3], "older": 0, "doc": 0, "24th": 0, "78": 0, "4cbe8f5": 0, "permiss": [0, 9], "resolut": 0, "deal": 0, "time": [0, 15], "out": [0, 1, 11], "10th": 0, "75": 0, "invit": [0, 14], "regex": [0, 3, 7], "longer": [0, 11], "return": [0, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 15], "url": [0, 3, 6], "safe": 0, "result": [0, 15], "refer": 0, "handl": [0, 13, 15], "captur": [0, 14], "all": [0, 1, 3, 4, 7, 15], "charact": 0, "up": [0, 1, 3], "whitespac": [0, 14], "6": 0, "26th": 0, "april": 0, "72": 0, "5a06fa5": 0, "notabl": 0, "one": [0, 3], "commit": 0, "dynam": 0, "extend": 0, "guild": [0, 1, 3, 13], "chunk": 0, "base": [0, 3, 4, 6, 8, 11, 12, 15], "number": 0, "so": [0, 1, 7], "should": [0, 1, 3, 6, 11], "actual": 0, "now": [0, 1, 15], "25th": 0, "69": 0, "get": [0, 3, 6, 9, 13], "21st": 0, "68": 0, "correct": [0, 1], "pyproject": [0, 1], "toml": [0, 1], "directli": 0, "main": 0, "don": [0, 15], "t": [0, 10, 15], "load": [0, 1, 3, 7], "modul": [0, 3, 7, 15], "start": [0, 3, 15], "_": 0, "66": 0, "each": 0, "cog": [0, 3, 5], "own": 0, "task": [0, 3, 15], "avoid": [0, 3], "singl": 0, "crash": 0, "entir": [0, 3], "process": 0, "20th": 0, "65": 0, "unqualifi": [0, 2, 3, 7], "namespac": [0, 15], "manipul": 0, "extens": [0, 3], "19th": 0, "64": 0, "987235d": 0, "revert": 0, "chang": [0, 1], "help": [0, 1], "command": [0, 1, 3, 7, 9], "behaviour": 0, "broke": 0, "custom": [0, 8, 12], "pagin": 0, "also": [0, 7, 11], "basic": [0, 11], "forum": 0, "channel": [0, 3, 7], "18th": 0, "63": 0, "api_cli": [0, 3], "__init__": [0, 2, 3, 4, 6, 7, 8, 11, 15], "site_api": [0, 2, 3], "apicli": [0, 2, 3, 6], "instanc": [0, 3, 6, 8, 9, 12, 15], "61": 0, "reconnect": 0, "redi": 0, "session": [0, 3, 6], "setup": [0, 3], "5th": 0, "56": 0, "move": 0, "creation": 0, "asyncio": [0, 4, 15], "event": [0, 3, 4, 15], "_guild_avail": 0, "within": [0, 3], "hook": 0, "deprec": 0, "notic": 0, "dummi": [0, 3], "asyncstatsdcli": 0, "befor": [0, 3, 11, 15], "real": 0, "cannot": [0, 3], "made": 0, "init": [0, 3, 4], "2nd": 0, "54": 0, "aiohttp": [0, 3, 6], "asyncresolv": 0, "42": 0, "public": 0, "statsd": [0, 3, 4], "client": [0, 3, 4], "ext": [0, 2, 3, 7, 9, 10], "sub": [0, 3], "class": [0, 3, 4, 6, 8, 11, 12, 15], "abstract": 0, "lot": 0, "logic": 0, "share": 0, "between": [0, 1], "latest": 0, "alpha": 0, "14th": 0, "march": 0, "39": 0, "migrat": 0, "back": 0, "37": 0, "log": [0, 3, 7, 13, 15], "trace": [0, 7, 12], "import": 0, "can": [0, 1, 11, 15], "function": [0, 3, 8, 9, 12, 13, 15], "3rd": 0, "35": 0, "apply_monkey_patch": [0, 2, 3, 7], "februari": 0, "34": 0, "port": [0, 4], "api": [0, 6, 13], "wrapper": [0, 6, 15], "from": [0, 1, 3, 4, 6, 7, 9, 11, 13, 15], "repo": 0, "22nd": 0, "32": 0, "0a0": 0, "disnak": 0, "29": 0, "mani": [0, 3, 8], "common": [0, 1, 3, 7, 12, 14], "cach": [0, 3, 7, 9, 13], "logger": [0, 12], "schedul": [0, 3, 7], "monkei": [0, 7], "patch": [0, 3, 6, 7], "ad": [0, 1, 7, 11, 12], "intersphinx": 0, "januari": 0, "12": 0, "code": [0, 1, 14], "block": [0, 14], "detect": 0, "decemb": 0, "2021": 0, "autogener": 0, "novemb": 0, "packag": [0, 7], "poetri": [0, 1], "lint": 0, "ci": 0, "To": [1, 3, 12], "your": 1, "ar": [1, 3, 8, 11, 14], "few": 1, "possibl": 1, "approach": 1, "instal": 1, "copi": 1, "pre": 1, "exist": [1, 15], "provid": [1, 8, 10, 15], "templat": 1, "dev": [1, 3], "folder": 1, "see": [1, 11], "below": 1, "more": 1, "info": 1, "both": 1, "what": 1, "go": 1, "them": [1, 3, 15], "you": [1, 9, 14], "ll": [1, 15], "write": 1, "might": 1, "mean": 1, "modifi": [1, 13], "ones": 1, "etc": 1, "The": [1, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 15], "step": 1, "most": 1, "groundwork": 1, "exact": 1, "requir": [1, 3, 15], "vari": 1, "re": [1, 3, 15], "navig": 1, "want": 1, "sir": 1, "lancebot": 1, "run": [1, 15], "pip": 1, "path": 1, "environ": 1, "root": [1, 3, 7], "directori": 1, "machin": 1, "That": 1, "contain": [1, 11, 15], "file": 1, "sure": 1, "again": 1, "git": 1, "ignor": [1, 7], "free": 1, "howev": 1, "like": 1, "m": 1, "docker": 1, "compos": 1, "d": 1, "configur": 1, "variabl": 1, "program": 1, "env": 1, "token": [1, 6], "intent": 1, "enabl": 1, "guild_id": [1, 3], "monitor": 1, "prefix": [1, 4], "invok": [1, 11], "default": 1, "mention": [1, 3], "allowed_rol": [1, 3, 11], "A": [1, 3, 6, 7, 8, 9, 11, 15], "comma": 1, "seper": 1, "list": [1, 3], "id": [1, 3, 9, 11, 15], "do": [1, 9], "anyth": 1, "reinstal": 1, "librari": 1, "includ": 1, "servic": [1, 3], "other": [1, 15], "applic": 1, "certain": 1, "add_cog": [2, 3], "add_command": [2, 3], "clear": [2, 3, 7, 8], "load_extens": [2, 3], "log_to_dev_log": [2, 3], "on_guild_avail": [2, 3], "on_guild_unavail": [2, 3], "remove_command": [2, 3], "setup_hook": [2, 3], "wait_until_guild_avail": [2, 3], "startuperror": [2, 3], "subpackag": 2, "submodul": 2, "async_stat": [2, 3], "asyncstatscli": [2, 3, 4], "responsecodeerror": [2, 3, 6], "index": 2, "search": 2, "page": 2, "inform": [2, 12], "local": 2, "test": 2, "changelog": 2, "tool": [3, 7], "arg": [3, 12], "http_session": 3, "redis_sess": 3, "kwarg": [3, 6, 11, 12, 15], "sourc": [3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], "implement": [3, 4, 8, 11, 12], "initialis": [3, 8], "int": [3, 4, 8, 9, 11, 15], "clientsess": [3, 6], "redissess": 3, "async_rediscach": 3, "str": [3, 4, 6, 7, 10, 11, 12, 15], "server": [3, 14], "If": [3, 6, 11, 15], "given": [3, 4, 7, 9, 10, 12, 13, 15], "oper": [3, 15], "type": [3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 15], "normal": 3, "alias": [3, 7], "Not": 3, "instanti": [3, 11, 15], "instead": [3, 15], "connector": 3, "resolv": 3, "save": 3, "all_extens": 3, "ran": 3, "loop": [3, 4, 15], "deadlock": 3, "caus": [3, 7], "wait_for": 3, "call": [3, 15], "intern": [3, 7], "becom": 3, "appear": 3, "still": 3, "empti": 3, "guild_available_but_cache_empti": 3, "emit": 3, "unavail": 3, "ping": 3, "ensur": [3, 11, 14], "thei": 3, "name": [3, 7, 12, 15], "alia": [3, 7], "individu": 3, "either": 3, "manual": 3, "edit": 3, "all_command": 3, "startup": 3, "create_socket": [3, 4], "wait": [3, 15], "until": [3, 14], "match": 3, "readi": 3, "on_readi": 3, "inadequ": 3, "becaus": 3, "second": [3, 11, 15], "guild_creat": 3, "gatewai": 3, "give": 3, "thu": 3, "popul": 3, "except": [3, 6, 12, 15], "error": [3, 6, 7, 13], "asynccach": [3, 7, 8], "get_or_fetch_channel": [3, 7, 9], "is_in_categori": [3, 7, 9], "clean_text_or_repli": [3, 7, 10], "customlogg": [3, 7, 12], "get_logg": [3, 7, 12], "get_or_fetch_memb": [3, 7, 13], "discord_invit": [3, 7, 14], "formatted_code_regex": [3, 7, 14], "raw_code_regex": [3, 7, 14], "create_task": [3, 7, 15], "maybe_raise_for_statu": [3, 6], "post": [3, 6], "put": [3, 6], "request": [3, 6, 14], "__str__": [3, 6], "transport": 4, "commun": 4, "host": 4, "localhost": 4, "8125": 4, "statsclientbas": 4, "abstracteventloop": [4, 15], "create_datagram_endpoint": 4, "socket": 4, "reusabl": 5, "around": 6, "site_api_url": 6, "site_api_token": 6, "session_kwarg": 6, "object": [6, 7, 8, 9, 13, 15], "django": 6, "initi": [6, 15], "authent": 6, "keyword": [6, 7, 12], "argument": [6, 7, 8, 10, 12, 13], "constructor": 6, "endpoint": 6, "raise_for_statu": 6, "true": [6, 12, 15], "send": [6, 11], "json": 6, "respons": 6, "bool": [6, 9, 11, 15], "whether": [6, 9], "rais": [6, 9, 10, 13, 15], "ok": 6, "ani": [6, 14, 15], "extra": 6, "dict": 6, "204": 6, "No": 6, "equival": 6, "static": 6, "should_rais": 6, "non": 6, "clientrespons": 6, "check": [6, 9, 11, 15], "http": [6, 14], "response_json": 6, "response_text": 6, "valueerror": 6, "receiv": [6, 9], "text": [6, 10], "represent": 6, "appli": [7, 8], "group": [7, 14], "root_alias": 7, "two": 7, "sequenc": [7, 11], "act": 7, "top": 7, "level": [7, 12], "rather": 7, "than": 7, "being": [7, 13], "It": 7, "store": [7, 8], "attribut": 7, "send_typ": 7, "403": 7, "under": 7, "heavi": 7, "cloudflar": 7, "worker": 7, "rout": 7, "thrown": 7, "qualifi": 7, "__call__": [7, 8], "callback": [7, 11], "interaction_check": [7, 11], "on_timeout": [7, 11], "__contains__": [7, 15], "cancel": [7, 15], "cancel_al": [7, 15], "schedule_at": [7, 15], "schedule_lat": [7, 15], "relat": [8, 12], "max_siz": 8, "128": 8, "lru": 8, "coroutin": [8, 13, 15], "onc": 8, "exce": 8, "maximum": 8, "size": 8, "kei": 8, "fifo": 8, "order": [8, 15], "offset": 8, "arg_offset": 8, "decor": 8, "posit": 8, "callabl": [8, 13], "wrap": [8, 15], "target": 8, "item": 8, "helper": [9, 13], "variou": 9, "channel_id": 9, "fetch": [9, 13], "invaliddata": 9, "unknown": 9, "httpexcept": 9, "retriev": 9, "fail": 9, "notfound": 9, "invalid": 9, "forbidden": 9, "have": [9, 12], "guildchannel": 9, "category_id": 9, "categori": 9, "textchannel": 9, "ctx": [10, 11], "repli": 10, "context": 10, "badargu": 10, "wasn": 10, "els": 10, "style": 11, "buttonstyl": 11, "secondari": 11, "label": 11, "click": 11, "itself": 11, "carri": 11, "done": [11, 15], "origin": 11, "allowed_us": 11, "180": 11, "moder": 11, "who": 11, "float": [11, 15], "last": 11, "ui": 11, "accept": 11, "input": 11, "similar": [11, 14], "after": [11, 15], "occur": 11, "msg": 12, "sever": 12, "exc_info": 12, "valu": 12, "houston": 12, "we": [12, 13], "interest": 12, "problem": 12, "mypi": 12, "recognis": 12, "interactin": 13, "member_id": 13, "failur": 13, "indic": 13, "could": 13, "found": [13, 15], "coro": [13, 15], "sole": 13, "expect": 13, "add_rol": 13, "remove_rol": 13, "purpos": 13, "intend": 13, "regular": 14, "express": 14, "pattern": 14, "pleas": 14, "sanitis": 14, "output": 14, "someth": 14, "urllib": 14, "pars": 14, "quot": 14, "format": 14, "raw": 14, "execut": 15, "keep": 15, "track": 15, "must": 15, "distinguish": 15, "suggest": 15, "immedi": 15, "futur": 15, "uniqu": 15, "prematur": 15, "same": 15, "current": 15, "task_id": 15, "hashabl": 15, "look": 15, "unschedul": 15, "identifi": 15, "warn": 15, "doesn": 15, "known": 15, "alreadi": 15, "prevent": 15, "unawait": 15, "elsewher": 15, "timezon": 15, "awar": 15, "calcul": 15, "subtract": 15, "na\u00efv": 15, "utc": 15, "past": 15, "datetim": 15, "delai": 15, "union": 15, "long": 15, "suppressed_except": 15, "event_loop": 15, "otherwis": 15, "typevar": 15, "task_return": 15, "tupl": 15}, "objects": {"": [[3, 0, 0, "-", "botcore"]], "botcore": [[3, 1, 1, "", "BotBase"], [3, 3, 1, "", "StartupError"], [4, 0, 0, "-", "async_stats"], [5, 0, 0, "-", "exts"], [6, 0, 0, "-", "site_api"], [7, 0, 0, "-", "utils"]], "botcore.BotBase": [[3, 2, 1, "", "__init__"], [3, 2, 1, "", "add_cog"], [3, 2, 1, "", "add_command"], [3, 2, 1, "", "clear"], [3, 2, 1, "", "close"], [3, 2, 1, "", "load_extensions"], [3, 2, 1, "", "log_to_dev_log"], [3, 2, 1, "", "on_guild_available"], [3, 2, 1, "", "on_guild_unavailable"], [3, 2, 1, "", "ping_services"], [3, 2, 1, "", "remove_command"], [3, 2, 1, "", "setup_hook"], [3, 2, 1, "", "wait_until_guild_available"]], "botcore.StartupError": [[3, 2, 1, "", "__init__"]], "botcore.async_stats": [[4, 1, 1, "", "AsyncStatsClient"]], "botcore.async_stats.AsyncStatsClient": [[4, 2, 1, "", "__init__"], [4, 2, 1, "", "create_socket"]], "botcore.site_api": [[6, 1, 1, "", "APIClient"], [6, 3, 1, "", "ResponseCodeError"]], "botcore.site_api.APIClient": [[6, 2, 1, "", "__init__"], [6, 2, 1, "", "close"], [6, 2, 1, "", "delete"], [6, 2, 1, "", "get"], [6, 2, 1, "", "maybe_raise_for_status"], [6, 2, 1, "", "patch"], [6, 2, 1, "", "post"], [6, 2, 1, "", "put"], [6, 2, 1, "", "request"]], "botcore.site_api.ResponseCodeError": [[6, 2, 1, "", "__init__"], [6, 2, 1, "", "__str__"]], "botcore.utils": [[7, 4, 1, "", "apply_monkey_patches"], [8, 0, 0, "-", "caching"], [9, 0, 0, "-", "channel"], [10, 0, 0, "-", "commands"], [11, 0, 0, "-", "interactions"], [12, 0, 0, "-", "logging"], [13, 0, 0, "-", "members"], [14, 0, 0, "-", "regex"], [15, 0, 0, "-", "scheduling"], [7, 4, 1, "", "unqualify"]], "botcore.utils.caching": [[8, 1, 1, "", "AsyncCache"]], "botcore.utils.caching.AsyncCache": [[8, 2, 1, "", "__call__"], [8, 2, 1, "", "__init__"], [8, 2, 1, "", "clear"]], "botcore.utils.channel": [[9, 4, 1, "", "get_or_fetch_channel"], [9, 4, 1, "", "is_in_category"]], "botcore.utils.commands": [[10, 4, 1, "", "clean_text_or_reply"]], "botcore.utils.interactions": [[11, 1, 1, "", "DeleteMessageButton"], [11, 1, 1, "", "ViewWithUserAndRoleCheck"]], "botcore.utils.interactions.DeleteMessageButton": [[11, 2, 1, "", "__init__"], [11, 2, 1, "", "callback"]], "botcore.utils.interactions.ViewWithUserAndRoleCheck": [[11, 2, 1, "", "__init__"], [11, 2, 1, "", "interaction_check"], [11, 2, 1, "", "on_timeout"]], "botcore.utils.logging": [[12, 1, 1, "", "CustomLogger"], [12, 4, 1, "", "get_logger"]], "botcore.utils.logging.CustomLogger": [[12, 2, 1, "", "trace"]], "botcore.utils.members": [[13, 4, 1, "", "get_or_fetch_member"], [13, 4, 1, "", "handle_role_change"]], "botcore.utils.regex": [[14, 5, 1, "", "DISCORD_INVITE"], [14, 5, 1, "", "FORMATTED_CODE_REGEX"], [14, 5, 1, "", "RAW_CODE_REGEX"]], "botcore.utils.scheduling": [[15, 1, 1, "", "Scheduler"], [15, 4, 1, "", "create_task"]], "botcore.utils.scheduling.Scheduler": [[15, 2, 1, "", "__contains__"], [15, 2, 1, "", "__init__"], [15, 2, 1, "", "cancel"], [15, 2, 1, "", "cancel_all"], [15, 2, 1, "", "schedule"], [15, 2, 1, "", "schedule_at"], [15, 2, 1, "", "schedule_later"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:exception", "4": "py:function", "5": "py:data"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "exception", "Python exception"], "4": ["py", "function", "Python function"], "5": ["py", "data", "Python data"]}, "titleterms": {"changelog": 0, "local": 1, "develop": 1, "test": 1, "option": 1, "1": 1, "2": 1, "bot": 2, "core": 2, "project": 2, "document": 2, "refer": 2, "modul": 2, "extra": 2, "botcor": 3, "subpackag": 3, "submodul": [3, 7], "async_stat": 4, "ext": 5, "site_api": 6, "util": 7, "cach": 8, "channel": 9, "command": 10, "interact": 11, "log": 12, "member": 13, "regex": 14, "schedul": 15}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "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": 57}, "alltitles": {"Bot Core Project Documentation": [[2, "bot-core-project-documentation"]], "Reference": [[2, "reference"]], "Modules:": [[2, null]], "Extras": [[2, "extras"]], "Botcore": [[3, "module-botcore"]], "Subpackages": [[3, "subpackages"]], "Submodules": [[3, "submodules"], [7, "submodules"]], "Exts": [[5, "module-botcore.exts"]], "async_stats": [[4, "module-botcore.async_stats"]], "Utils": [[7, "module-botcore.utils"]], "Changelog": [[0, "changelog"]], "site_api": [[6, "module-botcore.site_api"]], "Local Development & Testing": [[1, "local-development-testing"]], "Option 1": [[1, "option-1"]], "Option 2": [[1, "option-2"]], "commands": [[10, "module-botcore.utils.commands"]], "members": [[13, "module-botcore.utils.members"]], "regex": [[14, "module-botcore.utils.regex"]], "scheduling": [[15, "module-botcore.utils.scheduling"]], "channel": [[9, "module-botcore.utils.channel"]], "interactions": [[11, "module-botcore.utils.interactions"]], "logging": [[12, "module-botcore.utils.logging"]], "caching": [[8, "module-botcore.utils.caching"]]}, "indexentries": {"botbase (class in botcore)": [[3, "botcore.BotBase"]], "startuperror": [[3, "botcore.StartupError"]], "__init__() (botbase method)": [[3, "botcore.BotBase.__init__"]], "__init__() (startuperror method)": [[3, "botcore.StartupError.__init__"]], "add_cog() (botbase method)": [[3, "botcore.BotBase.add_cog"]], "add_command() (botbase method)": [[3, "botcore.BotBase.add_command"]], "botcore": [[3, "module-botcore"]], "clear() (botbase method)": [[3, "botcore.BotBase.clear"]], "close() (botbase method)": [[3, "botcore.BotBase.close"]], "load_extensions() (botbase method)": [[3, "botcore.BotBase.load_extensions"]], "log_to_dev_log() (botbase method)": [[3, "botcore.BotBase.log_to_dev_log"]], "module": [[3, "module-botcore"], [4, "module-botcore.async_stats"], [5, "module-botcore.exts"], [6, "module-botcore.site_api"], [7, "module-botcore.utils"], [8, "module-botcore.utils.caching"], [9, "module-botcore.utils.channel"], [10, "module-botcore.utils.commands"], [11, "module-botcore.utils.interactions"], [12, "module-botcore.utils.logging"], [13, "module-botcore.utils.members"], [14, "module-botcore.utils.regex"], [15, "module-botcore.utils.scheduling"]], "on_guild_available() (botbase method)": [[3, "botcore.BotBase.on_guild_available"]], "on_guild_unavailable() (botbase method)": [[3, "botcore.BotBase.on_guild_unavailable"]], "ping_services() (botbase method)": [[3, "botcore.BotBase.ping_services"]], "remove_command() (botbase method)": [[3, "botcore.BotBase.remove_command"]], "setup_hook() (botbase method)": [[3, "botcore.BotBase.setup_hook"]], "wait_until_guild_available() (botbase method)": [[3, "botcore.BotBase.wait_until_guild_available"]], "asyncstatsclient (class in botcore.async_stats)": [[4, "botcore.async_stats.AsyncStatsClient"]], "__init__() (asyncstatsclient method)": [[4, "botcore.async_stats.AsyncStatsClient.__init__"]], "botcore.async_stats": [[4, "module-botcore.async_stats"]], "create_socket() (asyncstatsclient method)": [[4, "botcore.async_stats.AsyncStatsClient.create_socket"]], "botcore.exts": [[5, "module-botcore.exts"]], "apiclient (class in botcore.site_api)": [[6, "botcore.site_api.APIClient"]], "responsecodeerror": [[6, "botcore.site_api.ResponseCodeError"]], "__init__() (apiclient method)": [[6, "botcore.site_api.APIClient.__init__"]], "__init__() (responsecodeerror method)": [[6, "botcore.site_api.ResponseCodeError.__init__"]], "__str__() (responsecodeerror method)": [[6, "botcore.site_api.ResponseCodeError.__str__"]], "botcore.site_api": [[6, "module-botcore.site_api"]], "close() (apiclient method)": [[6, "botcore.site_api.APIClient.close"]], "delete() (apiclient method)": [[6, "botcore.site_api.APIClient.delete"]], "get() (apiclient method)": [[6, "botcore.site_api.APIClient.get"]], "maybe_raise_for_status() (apiclient static method)": [[6, "botcore.site_api.APIClient.maybe_raise_for_status"]], "patch() (apiclient method)": [[6, "botcore.site_api.APIClient.patch"]], "post() (apiclient method)": [[6, "botcore.site_api.APIClient.post"]], "put() (apiclient method)": [[6, "botcore.site_api.APIClient.put"]], "request() (apiclient method)": [[6, "botcore.site_api.APIClient.request"]], "apply_monkey_patches() (in module botcore.utils)": [[7, "botcore.utils.apply_monkey_patches"]], "botcore.utils": [[7, "module-botcore.utils"]], "unqualify() (in module botcore.utils)": [[7, "botcore.utils.unqualify"]], "asynccache (class in botcore.utils.caching)": [[8, "botcore.utils.caching.AsyncCache"]], "__call__() (asynccache method)": [[8, "botcore.utils.caching.AsyncCache.__call__"]], "__init__() (asynccache method)": [[8, "botcore.utils.caching.AsyncCache.__init__"]], "botcore.utils.caching": [[8, "module-botcore.utils.caching"]], "clear() (asynccache method)": [[8, "botcore.utils.caching.AsyncCache.clear"]], "botcore.utils.channel": [[9, "module-botcore.utils.channel"]], "get_or_fetch_channel() (in module botcore.utils.channel)": [[9, "botcore.utils.channel.get_or_fetch_channel"]], "is_in_category() (in module botcore.utils.channel)": [[9, "botcore.utils.channel.is_in_category"]], "botcore.utils.commands": [[10, "module-botcore.utils.commands"]], "clean_text_or_reply() (in module botcore.utils.commands)": [[10, "botcore.utils.commands.clean_text_or_reply"]], "deletemessagebutton (class in botcore.utils.interactions)": [[11, "botcore.utils.interactions.DeleteMessageButton"]], "viewwithuserandrolecheck (class in botcore.utils.interactions)": [[11, "botcore.utils.interactions.ViewWithUserAndRoleCheck"]], "__init__() (deletemessagebutton method)": [[11, "botcore.utils.interactions.DeleteMessageButton.__init__"]], "__init__() (viewwithuserandrolecheck method)": [[11, "botcore.utils.interactions.ViewWithUserAndRoleCheck.__init__"]], "botcore.utils.interactions": [[11, "module-botcore.utils.interactions"]], "callback() (deletemessagebutton method)": [[11, "botcore.utils.interactions.DeleteMessageButton.callback"]], "interaction_check() (viewwithuserandrolecheck method)": [[11, "botcore.utils.interactions.ViewWithUserAndRoleCheck.interaction_check"]], "on_timeout() (viewwithuserandrolecheck method)": [[11, "botcore.utils.interactions.ViewWithUserAndRoleCheck.on_timeout"]], "customlogger (class in botcore.utils.logging)": [[12, "botcore.utils.logging.CustomLogger"]], "botcore.utils.logging": [[12, "module-botcore.utils.logging"]], "get_logger() (in module botcore.utils.logging)": [[12, "botcore.utils.logging.get_logger"]], "trace() (customlogger method)": [[12, "botcore.utils.logging.CustomLogger.trace"]], "botcore.utils.members": [[13, "module-botcore.utils.members"]], "get_or_fetch_member() (in module botcore.utils.members)": [[13, "botcore.utils.members.get_or_fetch_member"]], "handle_role_change() (in module botcore.utils.members)": [[13, "botcore.utils.members.handle_role_change"]], "discord_invite (in module botcore.utils.regex)": [[14, "botcore.utils.regex.DISCORD_INVITE"]], "formatted_code_regex (in module botcore.utils.regex)": [[14, "botcore.utils.regex.FORMATTED_CODE_REGEX"]], "raw_code_regex (in module botcore.utils.regex)": [[14, "botcore.utils.regex.RAW_CODE_REGEX"]], "botcore.utils.regex": [[14, "module-botcore.utils.regex"]], "scheduler (class in botcore.utils.scheduling)": [[15, "botcore.utils.scheduling.Scheduler"]], "__contains__() (scheduler method)": [[15, "botcore.utils.scheduling.Scheduler.__contains__"]], "__init__() (scheduler method)": [[15, "botcore.utils.scheduling.Scheduler.__init__"]], "botcore.utils.scheduling": [[15, "module-botcore.utils.scheduling"]], "cancel() (scheduler method)": [[15, "botcore.utils.scheduling.Scheduler.cancel"]], "cancel_all() (scheduler method)": [[15, "botcore.utils.scheduling.Scheduler.cancel_all"]], "create_task() (in module botcore.utils.scheduling)": [[15, "botcore.utils.scheduling.create_task"]], "schedule() (scheduler method)": [[15, "botcore.utils.scheduling.Scheduler.schedule"]], "schedule_at() (scheduler method)": [[15, "botcore.utils.scheduling.Scheduler.schedule_at"]], "schedule_later() (scheduler method)": [[15, "botcore.utils.scheduling.Scheduler.schedule_later"]]}})
\ No newline at end of file diff --git a/v8.0.0/versions.html b/v8.0.0/versions.html index 2edb447a..1a68cb53 100644 --- a/v8.0.0/versions.html +++ b/v8.0.0/versions.html @@ -4,7 +4,7 @@ <meta name="viewport" content="width=device-width,initial-scale=1"/> <meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /> - <link rel="shortcut icon" href="https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_full/logo_full.min.svg"/><meta name="generator" content="sphinx-5.1.1, furo 2022.09.15"/> + <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-5.2.2, furo 2022.09.15"/> <title>Versions - Bot Core v8.0.0</title> <link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=9ec31e2665bf879c1d47d93a8ec4893870ee1e45" /> @@ -207,6 +207,10 @@ </li> <li class="toctree-l2 "> + <a class="version_link reference internal" href="../v8.2.1/index.html">v8.2.1</a> + </li> + + <li class="toctree-l2 "> <a class="version_link reference internal" href="../v8.2.0/index.html">v8.2.0</a> </li> @@ -346,6 +350,12 @@ </li> <li> + <a class="reference internal" href="../v8.2.1/index.html">v8.2.1</a> + + + </li> + + <li> <a class="reference internal" href="../v8.2.0/index.html">v8.2.0</a> @@ -494,6 +504,7 @@ <script src="_static/underscore.js"></script> <script src="_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="_static/doctools.js"></script> + <script src="_static/sphinx_highlight.js"></script> <script src="_static/scripts/furo.js"></script> <script src="_static/changelog.js"></script> </body> |