Get docs working on latest docfx version. (#2778)

* [Docs] Get docs working on latest docfx version.

Removed light-dark-theme as it didn't work with modern docfx, and Material provides the features it provided anyways.

Gotta figure out how to get the description generator and "last modified" plugins to work.

* [Docs] Get docs working on latest docfx version.

Removed light-dark-theme as it didn't work with modern docfx, and Material provides the features it provided anyways.

Gotta figure out how to get the description generator and "last modified" plugins to work.

* [Docs] Re-add search index extractor.

* [Docs] Use material theme and override derived tree style.

Also adds a tiny GitHub icon on the navbar.

* [Docs] Exclude DebugTools project.

* [Docs] Use better method for overriding things.

Totally not because DocFX won't allow me to have an override template.

* [Docs] Improve styling overrides.

* [Docs] Fix links in FAQs and guides.

* [Docs] Use new xref service.

The old xref service is being deprecated by the end of the year.
See https://github.com/dotnet/docfx/issues/8958

* [Docs] Replace (c) with proper copyright symbol.

* [Docs] Fix formatting in docfx.json file.

Thanks, VSCode.

* [Docs] Remove non-working post processors.

They don't work, and *personally* I feel like they're unnecessary considering you can check the last modification date in the (linked) GitHub page. I honestly have no idea what the other post processor does and honestly the code doesn't help much either.

* [Docs] Fix "in this article" being too thin.

Fixes https://github.com/discord-net/Discord.Net/pull/2778#issuecomment-1748812077

* [Docs] Get examples working again.

* [Docs] Make properties be separated more clearly.

* [Docs] Change docs index to reflect the new nightly MyGet feed.

* [Docs] Get docs working on latest docfx version.

Removed light-dark-theme as it didn't work with modern docfx, and Material provides the features it provided anyways.

Gotta figure out how to get the description generator and "last modified" plugins to work.

* [Docs] Get docs working on latest docfx version.

Removed light-dark-theme as it didn't work with modern docfx, and Material provides the features it provided anyways.

Gotta figure out how to get the description generator and "last modified" plugins to work.

* [Docs] Re-add search index extractor.

* [Docs] Use material theme and override derived tree style.

Also adds a tiny GitHub icon on the navbar.

* [Docs] Exclude DebugTools project.

* [Docs] Use better method for overriding things.

Totally not because DocFX won't allow me to have an override template.

* [Docs] Improve styling overrides.

* [Docs] Fix links in FAQs and guides.

* [Docs] Use new xref service.

The old xref service is being deprecated by the end of the year.
See https://github.com/dotnet/docfx/issues/8958

* [Docs] Replace (c) with proper copyright symbol.

* [Docs] Fix formatting in docfx.json file.

Thanks, VSCode.

* [Docs] Remove non-working post processors.

They don't work, and *personally* I feel like they're unnecessary considering you can check the last modification date in the (linked) GitHub page. I honestly have no idea what the other post processor does and honestly the code doesn't help much either.

* [Docs] Fix "in this article" being too thin.

Fixes https://github.com/discord-net/Discord.Net/pull/2778#issuecomment-1748812077

* [Docs] Get examples working again.

* [Docs] Make properties be separated more clearly.

* [Docs] Change docs index to reflect the new nightly MyGet feed.

* [Docs] Fix index image not switching when changing themes.

Co-Authored-By: exsersewo <25526843+exsersewo@users.noreply.github.com>

* add updated description generator postprocessor

* update postprocessor

* got it working

* downgrade postprocessor docfx

* [Docs] Add left margin to side navigation links.

* remove dup docs cuz `<inheritdoc />`

---------

Co-authored-by: exsersewo <25526843+exsersewo@users.noreply.github.com>
Co-authored-by: Misha133 <mihagribkov133@gmail.com>
Co-authored-by: Mihail Gribkov <61027276+Misha-133@users.noreply.github.com>
This commit is contained in:
Nora
2024-02-11 19:51:10 +01:00
committed by GitHub
parent 89efe0f3ad
commit dc8e0e329d
65 changed files with 286 additions and 2651 deletions

View File

@@ -1,29 +0,0 @@
MIT License
Copyright (c) 2018 Still Hsu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
==============================================================================
Humanizer (https://github.com/Humanizr/Humanizer)
The MIT License (MIT)
Copyright (c) .NET Foundation and Contributors
==============================================================================

View File

@@ -1,4 +0,0 @@
<configuration>
<dllmap os="linux" cpu="x86-64" wordsize="64" dll="git2-6777db8" target="lib/linux-x64/libgit2-6777db8.so" />
<dllmap os="osx" cpu="x86,x86-64" dll="git2-6777db8" target="lib/osx/libgit2-6777db8.dylib" />
</configuration>

View File

@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2019 Oscar Vásquez
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,34 +0,0 @@
{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="theme-switch-field">
<p>Theme</p>
<select id="theme-switcher">
<option value="dark">Dark</option>
<option value="gray">Gray</option>
<option value="light">Light</option>
</select>
</div>
{{^_disableContribution}}
<div class="contribution">
<ul class="nav">
{{#docurl}}
<li>
<a href="{{docurl}}" class="contribution-link">{{__global.improveThisDoc}}</a>
</li>
{{/docurl}}
{{#sourceurl}}
<li>
<a href="{{sourceurl}}" class="contribution-link">{{__global.viewSource}}</a>
</li>
{{/sourceurl}}
</ul>
</div>
{{/_disableContribution}}
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<h5>{{__global.inThisArticle}}</h5>
<div></div>
</nav>
</div>
</div>

View File

@@ -1,33 +0,0 @@
{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}</title>
<meta name="viewport" content="width=device-width">
<meta property="og:title" content="{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}">
{{#_description}}<meta property="og:description" content="{{_description}}">{{/_description}}
<meta property="og:locale" content="en-us">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Discord.Net Docs">
<meta property="og:image" content="https://raw.githubusercontent.com/Discord-Net/Discord.Net/dev/docs/marketing/logo/PackageLogo.png">
<meta property="og:image:alt" content="Discord.Net Logo">
<meta name="theme-color" content="#995EA7"/>
<meta name="generator" content="docfx {{_docfxVersion}}">
<meta property="docfx:navrel" content="{{_navRel}}">
<meta property="docfx:tocrel" content="{{_tocRel}}">
<meta id="docfx-style:rel" content="{{_rel}}">
<link rel="preload" href="{{_rel}}styles/search-worker.js" as="script">
<link rel="preload" href="{{_rel}}fonts/glyphicons-halflings-regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="shortcut icon" href="{{_rel}}{{{_appFaviconPath}}}{{^_appFaviconPath}}favicon.ico{{/_appFaviconPath}}">
<link rel="stylesheet" href="{{_rel}}styles/docfx.vendor.minify.css">
<link rel="stylesheet" href="{{_rel}}styles/docfx.css">
<link rel="stylesheet" href="{{_rel}}styles/master.css">
<link rel="stylesheet" href="{{_rel}}styles/main.css">
<link rel="stylesheet" href="{{_rel}}styles/material.css">
<link rel="stylesheet" href="{{_rel}}styles/theme-switcher.css">
<link href="https://cdn.rawgit.com/noelboss/featherlight/1.7.6/release/featherlight.min.css" type="text/css" rel="stylesheet" />
{{#_noindex}}<meta name="searchOption" content="noindex">{{/_noindex}}
{{#_enableSearch}}<meta property="docfx:rel" content="{{_rel}}">{{/_enableSearch}}
{{#_enableNewTab}}<meta property="docfx:newtab" content="true">{{/_enableNewTab}}
</head>

View File

@@ -1,8 +0,0 @@
{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}
<script type="text/javascript" src="{{_rel}}styles/docfx.vendor.js"></script>
<script type="text/javascript" src="{{_rel}}styles/docfx.js"></script>
<script type="text/javascript" src="{{_rel}}styles/main.js"></script>
<script type="text/javascript" src="{{_rel}}styles/styleswitcher.js"></script>
<script type="text/javascript" src="https://malsup.github.io/jquery.corner.js"></script>
<script type="text/javascript" src="{{_rel}}styles/cornerify.js"></script>

View File

@@ -1,3 +0,0 @@
window.onload = function (e) {
$('img').corner();
}

View File

@@ -1,322 +0,0 @@
/* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License.txt in the project root for license information. */
@import url('vs2015.css');
html,
body {
background: #212121;
color: #C0C0C0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: #E0E0E0;
}
button,
a {
color: #64B5F6;
}
.sidenav{
background-color: rgb(30, 30, 30);
}
button:hover,
button:focus,
a:hover,
a:focus,
.btn:focus,
.btn:hover{
color: #2196F3;
}
a.disable,
a.disable:hover {
color: #EEEEEE;
}
.divider {
color: #37474F;
}
hr {
border-color: #37474F;
}
.subnav {
background: #383838
}
.inheritance h5,
.inheritedMembers h5 {
border-bottom: 1px solid #37474F;
}
article h4 {
border-bottom: 1px solid #37474F;
}
.docs-search {
background: #424242;
}
.search-results-group-heading {
color: #424242;
}
.search-close {
color: #424242;
}
.sidetoc {
background-color: #1b1b1b;
border-left: 0px solid #37474F;
border-right: 0px solid #37474F;
}
.sideaffix {
overflow: visible;
}
.sideaffix>div.contribution>ul>li>a.contribution-link:hover {
background-color: #333333;
}
/* toc */
.toc .nav>li>a {
color: rgb(218, 218, 218);
}
.toc .nav>li>a:hover,
.toc .nav>li>a:focus {
color: #E0E0E0;
}
.toc .nav>li.active>a {
color: #90CAF9;
}
.toc .nav>li.active>a:hover,
.toc .nav>li.active>a:focus {
background-color: #37474F;
color: #4FC3F7;
}
.sidefilter {
background-color: #1b1b1b;
border-left: 0px solid #37474F;
border-right: 0px solid #37474F;
}
.affix ul>li>a:hover {
background: none;
color: #EEEEEE;
}
.affix ul>li.active>a,
.affix ul>li.active>a:before {
color: #B3E5FC;
}
.affix ul>li>a {
color: #EEEEEE;
}
.affix>ul>li.active>a,
.affix>ul>li.active>a:before {
color: #B3E5FC;
}
.tryspan {
border-color: #37474F;
}
.footer {
border-top: 1px solid #5F5F5F;
background: #616161;
}
/* alert */
.alert-info {
color: #d9edf7;
background: #004458;
border-color: #005873;
}
.alert-warning {
color: #fffaf2;
background: #80551a;
border-color: #99661f;
}
.alert-danger {
color: #fff2f2;
background: #4d0000;
border-color: #660000;
}
/* For tabbed content */
.tabGroup {
margin-top: 1rem;
}
.tabGroup ul[role="tablist"] {
margin: 0;
padding: 0;
list-style: none;
}
.tabGroup ul[role="tablist"]>li {
list-style: none;
display: inline-block;
}
.tabGroup a[role="tab"] {
color: white;
box-sizing: border-box;
display: inline-block;
padding: 5px 7.5px;
text-decoration: none;
border-bottom: 2px solid #fff;
}
.tabGroup a[role="tab"]:hover,
.tabGroup a[role="tab"]:focus,
.tabGroup a[role="tab"][aria-selected="true"] {
border-bottom: 2px solid #607D8B;
}
.tabGroup a[role="tab"][aria-selected="true"] {
color: #81D4FA;
}
.tabGroup a[role="tab"]:hover,
.tabGroup a[role="tab"]:focus {
color: #29B6F6;
}
.tabGroup a[role="tab"]:focus {
outline: 1px solid #607D8B;
outline-offset: -1px;
}
@media (min-width: 768px) {
.tabGroup a[role="tab"] {
padding: 5px 15px;
}
}
.tabGroup section[role="tabpanel"] {
border: 1px solid #607D8B;
padding: 15px;
margin: 0;
overflow: hidden;
}
.tabGroup section[role="tabpanel"]>.codeHeader,
.tabGroup section[role="tabpanel"]>pre {
margin-left: -16px;
margin-right: -16px;
}
.tabGroup section[role="tabpanel"]> :first-child {
margin-top: 0;
}
.tabGroup section[role="tabpanel"]>pre:last-child {
display: block;
margin-bottom: -16px;
}
.mainContainer[dir='rtl'] main ul[role="tablist"] {
margin: 0;
}
/* code */
code {
color: white;
background-color: #4a4c52;
border-radius: 4px;
padding: 3px 7px;
}
pre {
background-color: #282a36;
}
/* table */
.table-striped>tbody>tr:nth-of-type(odd) {
background-color: #333333;
color: #d3d3d3
}
tbody>tr {
background-color: #424242;
color: #c0c0c0
}
.table>tbody+tbody {
border-top: 2px solid rgb(173, 173, 173)
}
/* top navbar */
.navbar-inverse[role="navigation"] {
background-color: #2C2F33;
}
/* select */
select {
background-color: #3b3b3b;
border-color: #2e2e2e;
}
/*
Following code regarding collapse container are fetched
or modified from the Materialize project.
The MIT License (MIT)
Copyright (c) 2014-2018 Materialize
https://github.com/Dogfalo/materialize
*/
/* all collapse container */
.collapse-container.last-modified {
-webkit-box-shadow: 0 2px 2px 0 rgba(50, 50, 50, 0.64), 0 3px 1px -2px rgba(50, 50, 50, 0.62), 0 1px 5px 0 rgba(50, 50, 50, 0.7);
box-shadow: 0 2px 2px 0 rgba(50, 50, 50, 0.64), 0 3px 1px -2px rgba(50, 50, 50, 0.62), 0 1px 5px 0 rgba(50, 50, 50, 0.7);
border-top: 1px solid rgba(96, 96, 96, 0.7);
border-right: 1px solid rgba(96, 96, 96, 0.7);
border-left: 1px solid rgba(96, 96, 96, 0.7);
}
/* header */
.collapse-container.last-modified>:nth-child(odd) {
background-color: #3f3f3f;
border-bottom: 1px solid rgba(96, 96, 96, 0.7);
}
/* body */
.collapse-container.last-modified>:nth-child(even) {
border-bottom: 1px solid rgba(96, 96, 96, 0.7);
background-color: inherit;
}
span.arrow-d{
border-top: 5px solid white
}
span.arrow-r{
border-left: 5px solid white
}
.logo-switcher {
background: url("../marketing/logo/SVG/Combinationmark White.svg") no-repeat;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,324 +0,0 @@
/* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License.txt in the project root for license information. */
@import url('vs2015.css');
html,
body {
background: #23272A;
color: #dddddd;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: #EEEEEE;
}
button,
a {
color: #64B5F6;
}
.sidenav{
background-color: rgb(30, 30, 30);
}
button:hover,
button:focus,
a:hover,
a:focus,
.btn:focus,
.btn:hover{
color: #2196F3;
}
a.disable,
a.disable:hover {
color: #EEEEEE;
}
.divider {
color: #37474F;
}
hr {
border-color: #37474F;
}
/* top navbar */
/*.navbar-inverse[role="navigation"] {
background-color: #2C2F33;
}*/
/* sub navbar (below top) */
.subnav {
background: rgb(69, 75, 82)
}
.inheritance h5,
.inheritedMembers h5 {
border-bottom: 1px solid #37474F;
}
article h4 {
border-bottom: 1px solid #37474F;
}
.docs-search {
background: #424242;
}
.search-results-group-heading {
color: #424242;
}
.search-close {
color: #424242;
}
.sidetoc {
background-color: #1b1b1b;
border-left: 0px solid #37474F;
border-right: 0px solid #37474F;
}
.sideaffix {
overflow: visible;
}
.sideaffix>div.contribution>ul>li>a.contribution-link:hover {
background-color: #333333;
}
/* toc */
.toc .nav>li>a {
color: rgb(218, 218, 218);
}
.toc .nav>li>a:hover,
.toc .nav>li>a:focus {
color: #E0E0E0;
}
.toc .nav>li.active>a {
color: #90CAF9;
}
.toc .nav>li.active>a:hover,
.toc .nav>li.active>a:focus {
background-color: #37474F;
color: #4FC3F7;
}
.sidefilter {
background-color: #1b1b1b;
border-left: 0px solid #37474F;
border-right: 0px solid #37474F;
}
.affix ul>li>a:hover {
background: none;
color: #EEEEEE;
}
.affix ul>li.active>a,
.affix ul>li.active>a:before {
color: #B3E5FC;
}
.affix ul>li>a {
color: #EEEEEE;
}
.affix>ul>li.active>a,
.affix>ul>li.active>a:before {
color: #B3E5FC;
}
.tryspan {
border-color: #37474F;
}
.footer {
border-top: 1px solid #5F5F5F;
background: #2C2F33;
}
/* alert */
.alert-info {
color: #f3fdff;
background: #40788A;
border-color: #2F7A95;
}
.alert-warning {
color: #fffaf2;
background: #936C36;
border-color: #AE8443;
}
.alert-danger {
color: #fff4f4;
background: #834040;
border-color: #8C2F2F
}
/* For tabbed content */
.tabGroup {
margin-top: 1rem;
}
.tabGroup ul[role="tablist"] {
margin: 0;
padding: 0;
list-style: none;
}
.tabGroup ul[role="tablist"]>li {
list-style: none;
display: inline-block;
}
.tabGroup a[role="tab"] {
color: white;
box-sizing: border-box;
display: inline-block;
padding: 5px 7.5px;
text-decoration: none;
border-bottom: 2px solid #fff;
}
.tabGroup a[role="tab"]:hover,
.tabGroup a[role="tab"]:focus,
.tabGroup a[role="tab"][aria-selected="true"] {
border-bottom: 2px solid #607D8B;
}
.tabGroup a[role="tab"][aria-selected="true"] {
color: #81D4FA;
}
.tabGroup a[role="tab"]:hover,
.tabGroup a[role="tab"]:focus {
color: #29B6F6;
}
.tabGroup a[role="tab"]:focus {
outline: 1px solid #607D8B;
outline-offset: -1px;
}
@media (min-width: 768px) {
.tabGroup a[role="tab"] {
padding: 5px 15px;
}
}
.tabGroup section[role="tabpanel"] {
border: 1px solid #607D8B;
padding: 15px;
margin: 0;
overflow: hidden;
}
.tabGroup section[role="tabpanel"]>.codeHeader,
.tabGroup section[role="tabpanel"]>pre {
margin-left: -16px;
margin-right: -16px;
}
.tabGroup section[role="tabpanel"]> :first-child {
margin-top: 0;
}
.tabGroup section[role="tabpanel"]>pre:last-child {
display: block;
margin-bottom: -16px;
}
.mainContainer[dir='rtl'] main ul[role="tablist"] {
margin: 0;
}
/* code */
code {
color: white;
background-color: #5B646B;
border-radius: 4px;
padding: 3px 7px;
}
pre {
background-color: #282a36;
}
/* table */
.table-striped>tbody>tr:nth-of-type(odd) {
background-color: #333333;
color: #d3d3d3
}
tbody>tr {
background-color: #424242;
color: #c0c0c0
}
.table>tbody+tbody {
border-top: 2px solid rgb(173, 173, 173)
}
/* select */
select {
background-color: #3b3b3b;
border-color: #2e2e2e;
}
/*
Following code regarding collapse container are fetched
or modified from the Materialize project.
The MIT License (MIT)
Copyright (c) 2014-2018 Materialize
https://github.com/Dogfalo/materialize
*/
/* all collapse container */
.collapse-container.last-modified {
-webkit-box-shadow: 0 2px 2px 0 rgba(50, 50, 50, 0.64), 0 3px 1px -2px rgba(50, 50, 50, 0.62), 0 1px 5px 0 rgba(50, 50, 50, 0.7);
box-shadow: 0 2px 2px 0 rgba(50, 50, 50, 0.64), 0 3px 1px -2px rgba(50, 50, 50, 0.62), 0 1px 5px 0 rgba(50, 50, 50, 0.7);
border-top: 1px solid rgba(96, 96, 96, 0.7);
border-right: 1px solid rgba(96, 96, 96, 0.7);
border-left: 1px solid rgba(96, 96, 96, 0.7);
}
/* header */
.collapse-container.last-modified>:nth-child(odd) {
background-color: #3f3f3f;
border-bottom: 1px solid rgba(96, 96, 96, 0.7);
}
/* body */
.collapse-container.last-modified>:nth-child(even) {
border-bottom: 1px solid rgba(96, 96, 96, 0.7);
background-color: inherit;
}
span.arrow-d{
border-top: 5px solid white
}
span.arrow-r{
border-left: 5px solid white
}
.logo-switcher {
background: url("../marketing/logo/SVG/Combinationmark White.svg") no-repeat;
}

View File

@@ -1,117 +0,0 @@
/* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License.txt in the project root for license information. */
@import url('tomorrow.css');
html,
body {
background: #fff;
color: #000;
}
.sideaffix {
overflow: visible;
}
/* links */
a:active, a:hover, a:visited {
color: #0078d7;
}
a {
color: #0050c5;
cursor: pointer;
text-decoration: none;
word-wrap: break-word;
}
/* alert */
.alert-info {
color: #165e82;
background-color: #c1e0ef;
border-color: #8cbfd8;
}
.alert-warning {
color: #825e16;
background-color: #efe0c1;
border-color: #d8bf8c;
}
.alert-danger {
color: #821616;
background-color: #efc1c1;
border-color: #d88c8c;
}
/* code */
code {
color: #9c3a3f;
background-color: #ececec;
border-radius: 4px;
padding: 3px 7px;
}
/* table */
.table-striped>tbody>tr:nth-of-type(odd) {
color: #333333;
background-color: #d3d3d3
}
tbody>tr {
color: #424242;
background-color: #c0c0c0
}
.table>tbody+tbody {
border-top: 2px solid rgb(173, 173, 173)
}
/* select */
select {
background-color: #fcfcfc;
border-color: #aeb1b5;
}
/*
Following code regarding collapse container are fetched
or modified from the Materialize project.
The MIT License (MIT)
Copyright (c) 2014-2018 Materialize
https://github.com/Dogfalo/materialize
*/
/* all collapse container */
.collapse-container.last-modified {
-webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);
border-top: 1px solid #ddd;
border-right: 1px solid #ddd;
border-left: 1px solid #ddd;
}
/* header */
.collapse-container.last-modified>:nth-child(odd) {
background-color: #fff;
border-bottom: 1px solid #ddd;
}
/* body */
.collapse-container.last-modified>:nth-child(even) {
border-bottom: 1px solid #ddd;
}
span.arrow-d{
border-top: 5px solid black
}
span.arrow-r{
border-left: 5px solid black
}
.logo-switcher {
background: url("../marketing/logo/SVG/Combinationmark.svg") no-repeat;
}

View File

@@ -1,234 +0,0 @@
@import url('https://fonts.googleapis.com/css?family=Roboto|Muli|Fira+Mono');
html,
body {
font-family: 'Roboto', 'Segoe UI', Tahoma, Helvetica, sans-serif;
font-display: optional;
height: 100%;
font-size: 15px;
}
code{
font-family: 'Fira Mono', 'Courier New', Courier, monospace
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: 'Muli', Verdana, Geneva, Tahoma, sans-serif;
line-height: 130%;
}
h1,
.h1,
h2,
.h2,
h3,
.h3 {
font-weight: 600;
}
#logo
{
max-width: 100px;
max-height: 100px;
width: 38pt;
height: 38pt;
padding: 8pt;
}
p,
li,
.toc {
text-rendering: optimizeLegibility;
line-height: 160%;
}
.toc-filter{
background: inherit !important;
}
.affix ul>li.active>ul, .affix ul>li.active>a:before, .affix ul>li>a:hover:before{
white-space: normal;
}
img {
box-shadow: 0px 0px 3px 0px rgb(66, 66, 66);
max-width: 95% !important;
margin-top: 15px;
margin-bottom: 15px;
}
.big-logo {
display: block;
box-shadow: none !important;
/* Width value was taken from the original size of the combomark svg */
width: 951pt;
/* Height was arbitrarily determined */
min-height: 100pt;
max-width: 90%;
}
article.content p{
-webkit-transition: all .75s ease-in-out;
transition: all .75s ease-in-out;
}
article.content h1,
article.content h2,
article.content h3,
article.content h4,
article.content h5,
article.content h6{
-webkit-transition: all .25s ease-in-out;
transition: all .25s ease-in-out;
}
.sideaffix {
line-height: 140%;
}
.sideaffix > div.contribution {
margin-bottom: 0;
}
header .navbar {
border-width: 0 0 0px;
border-radius: 0;
}
body .toc {
background-color: inherit;
overflow: visible;
}
select {
display: inline-block;
overflow: auto;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0 30px 0 6px;
vertical-align: middle;
height: 28px;
border: 1px solid #e3e3e3;
line-height: 16px;
outline: 0;
text-overflow: ellipsis;
-webkit-appearance: none;
-moz-appearance: none;
cursor: pointer;
background-image: linear-gradient(45deg, transparent 50%, #707070 0), linear-gradient(135deg, #707070 50%, transparent 0);
background-position: calc(100% - 13px) 11px, calc(100% - 8px) 11px;
background-size: 5px 5px, 5px 6px;
background-repeat: no-repeat;
}
/*
Following code are fetched or modified from
the Materialize project.
The MIT License (MIT)
Copyright (c) 2014-2018 Materialize
https://github.com/Dogfalo/materialize
*/
/* all collapse container */
.collapse-container.last-modified {
margin: 0.5rem 0 1rem 0;
}
/* header */
.collapse-container.last-modified>:nth-child(odd):focus {
outline: 0;
}
.collapse-container.last-modified>:nth-child(odd) {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
line-height: 1.5;
padding: 0.75rem;
background-image: none;
border: 0px;
}
/* body */
.collapse-container.last-modified>:nth-child(even) {
display: none;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 1rem;
border: 0px;
}
/* nav bar */
.nav {
margin: 0;
}
.nav li {
-webkit-transition: background-color .3s, color .3s;
transition: background-color .3s, color .3s;
}
.nav a {
-webkit-transition: background-color .3s, color .3s;
transition: background-color .3s, color .3s;
cursor: pointer;
}
/* arrow */
span.arrow-d{
top: 6px; position: relative;
}
span.arrow-r{
top: 6px; position: relative;
}
/* widen viewport */
@media (min-width: 1085px) {
.container {
width: calc(100% - 15vw);
max-width: calc(100% - 15vw);
}
}
/* fix level indentation */
.level2 {
padding: 0 5px;
}
.level3 {
padding: 0 5px;
font-size: 90%;
}
.level4 {
padding: 0 5px;
font-size: 85%;
}
.level5 {
padding: 0 5px;
font-size: 80%;
}
.level6 {
padding: 0 5px;
font-size: 75%;
}

View File

@@ -1,199 +0,0 @@
body {
color: #34393e;
line-height: 1.5;
/*font-size: 16px;*/
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
word-wrap: break-word
}
/* HEADINGS */
h1 {
font-weight: 600;
font-size: 32px;
}
h2 {
font-weight: 600;
font-size: 24px;
line-height: 1.8;
}
h3 {
font-weight: 600;
font-size: 20px;
line-height: 1.8;
}
h5 {
font-size: 14px;
padding: 10px 0px;
}
article h1,
article h2,
article h3,
article h4 {
margin-top: 35px;
margin-bottom: 15px;
}
article h4 {
padding-bottom: 8px;
border-bottom: 2px solid #ddd;
}
/* NAVBAR */
.navbar-brand>img {
color: #fff;
}
.navbar {
border: none;
/* Both navbars use box-shadow */
-webkit-box-shadow: 0px 1px 3px 0px rgba(100, 100, 100, 0.5);
-moz-box-shadow: 0px 1px 3px 0px rgba(100, 100, 100, 0.5);
box-shadow: 0px 1px 3px 0px rgba(100, 100, 100, 0.5);
}
.subnav {
border-top: 1px solid #ddd;
background-color: #fff;
}
.navbar-inverse {
background-color: #0d47a1;
z-index: 100;
}
.navbar-inverse .navbar-nav>li>a,
.navbar-inverse .navbar-text {
color: #fff;
/*background-color: #0d47a1;*/
border-bottom: 3px solid transparent;
padding-bottom: 12px;
}
.navbar-inverse .navbar-nav>li>a:focus,
.navbar-inverse .navbar-nav>li>a:hover {
color: #fff;
background-color: #1157c0;
border-bottom: 3px solid white;
}
.navbar-inverse .navbar-nav>.active>a,
.navbar-inverse .navbar-nav>.active>a:focus,
.navbar-inverse .navbar-nav>.active>a:hover {
color: #fff;
background-color: #1157c0;
border-bottom: 3px solid white;
}
.navbar-form .form-control {
border: none;
border-radius: 20px;
}
/* SIDEBAR */
/*.toc .level1>li {
font-weight: 400;
}*/
.toc .nav>li>a {
color: #34393e;
}
.sidefilter {
background-color: #fff;
border-left: none;
border-right: none;
}
.sidefilter {
background-color: #fff;
border-left: none;
border-right: none;
}
.toc-filter {
padding: 10px;
margin: 0;
}
.toc-filter>input {
border: 2px solid #ddd;
border-radius: 20px;
}
.toc-filter>.filter-icon {
display: none;
}
.sidetoc>.toc {
overflow-x: hidden;
}
.sidetoc {
border: none;
}
/* ALERTS */
.alert {
padding: 0px 0px 5px 0px;
color: inherit;
background-color: inherit;
border: none;
box-shadow: 0px 2px 2px 0px rgba(100, 100, 100, 0.4);
}
.alert>p {
margin-bottom: 0;
padding: 5px 10px;
}
.alert>ul {
margin-bottom: 0;
padding: 5px 40px;
}
.alert>h5 {
padding: 10px 15px;
margin-top: 0;
text-transform: uppercase;
font-weight: bold;
border-radius: 4px 4px 0 0;
}
.alert-info>h5 {
color: #1976d2;
border-bottom: 4px solid #1976d2;
background-color: #e3f2fd;
}
.alert-warning>h5 {
color: #f57f17;
border-bottom: 4px solid #f57f17;
background-color: #fff3e0;
}
.alert-danger>h5 {
color: #d32f2f;
border-bottom: 4px solid #d32f2f;
background-color: #ffebee;
}
/* CODE HIGHLIGHT */
pre {
padding: 9.5px;
margin: 10px 10px 10px;
font-size: 13px;
word-break: break-all;
word-wrap: break-word;
/*background-color: #fffaef;*/
border-radius: 4px;
box-shadow: 0px 1px 4px 1px rgba(100, 100, 100, 0.4);
}

View File

@@ -1,26 +0,0 @@
const baseUrl = document.getElementById("docfx-style:rel").content;
function onThemeSelect(event) {
const theme = event.target.value;
window.localStorage.setItem("theme", theme);
window.themeElement.href = getUrl(theme);
}
function getUrl(slug) {
return baseUrl + "styles/" + slug + ".css";
}
const themeElement = document.createElement("link");
themeElement.rel = "stylesheet";
const theme = window.localStorage.getItem("theme") || "light";
themeElement.href = getUrl(theme);
document.head.appendChild(themeElement);
window.themeElement = themeElement;
document.addEventListener("DOMContentLoaded", function() {
const themeSwitcher = document.getElementById("theme-switcher");
themeSwitcher.onchange = onThemeSelect;
themeSwitcher.value = theme;
}, false);

View File

@@ -1,9 +0,0 @@
div.theme-switch-field {
padding-left: 10px;
padding-bottom: 15px
}
div.theme-switch-field > p{
font-weight: bold;
font-size: 1.2em;
}

View File

@@ -1,72 +0,0 @@
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Tomorrow Comment */
.hljs-comment,
.hljs-quote {
color: #8e908c;
}
/* Tomorrow Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
color: #c82829;
}
/* Tomorrow Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
color: #f5871f;
}
/* Tomorrow Yellow */
.hljs-attribute {
color: #eab700;
}
/* Tomorrow Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #718c00;
}
/* Tomorrow Blue */
.hljs-title,
.hljs-section {
color: #4271ae;
}
/* Tomorrow Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #8959a8;
}
.hljs {
display: block;
overflow-x: auto;
background: white;
color: #4d4d4c;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@@ -1,115 +0,0 @@
/*
* Visual Studio 2015 dark style
* Author: Nicolas LLOBERA <nllobera@gmail.com>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #282a36;
color: #DCDCDC;
}
.hljs-keyword,
.hljs-literal,
.hljs-symbol,
.hljs-name {
color: #569CD6;
}
.hljs-link {
color: #569CD6;
text-decoration: underline;
}
.hljs-built_in,
.hljs-type {
color: #4EC9B0;
}
.hljs-number,
.hljs-class {
color: #B8D7A3;
}
.hljs-string,
.hljs-meta-string {
color: #D69D85;
}
.hljs-regexp,
.hljs-template-tag {
color: #9A5334;
}
.hljs-subst,
.hljs-function,
.hljs-title,
.hljs-params,
.hljs-formula {
color: #DCDCDC;
}
.hljs-comment,
.hljs-quote {
color: #57A64A;
font-style: italic;
}
.hljs-doctag {
color: #608B4E;
}
.hljs-meta,
.hljs-meta-keyword,
.hljs-tag {
color: #9B9B9B;
}
.hljs-variable,
.hljs-template-variable {
color: #BD63C5;
}
.hljs-attr,
.hljs-attribute,
.hljs-builtin-name {
color: #9CDCFE;
}
.hljs-section {
color: gold;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
/*.hljs-code {
font-family:'Monospace';
}*/
.hljs-bullet,
.hljs-selector-tag,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #D7BA7D;
}
.hljs-addition {
background-color: #144212;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #600;
display: inline-block;
width: 100%;
}

218
docs/_template/material/public/main.css vendored Normal file
View File

@@ -0,0 +1,218 @@
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;400;700&display=swap');
:root {
--bs-font-sans-serif: 'Roboto';
--bs-border-radius: 10px;
--border-radius-button: 40px;
--card-box-shadow: 0 1px 2px 0 #3d41440f, 0 1px 3px 1px #3d414429;
--material-yellow-light: #e6dfbf;
--material-yellow-dark: #5a5338;
--material-blue-light: #c4d9f1;
--material-blue-dark: #383e5a;
--material-red-light: #f1c4c4;
--material-red-dark: #5a3838;
--material-warning-header: #f57f171a;
--material-warning-background: #f6e8bd;
--material-warning-background-dark: #57502c;
--material-info-header: #1976d21a;
--material-info-background: #e3f2fd;
--material-info-background-dark: #2c4557;
--material-danger-header: #d32f2f1a;
--material-danger-background: #ffebee;
--material-danger-background-dark: #572c2c;
}
/* HEADINGS */
h1 {
font-weight: 600;
font-size: 32px;
}
h2 {
font-weight: 600;
font-size: 24px;
line-height: 1.8;
}
h3 {
font-weight: 600;
font-size: 20px;
line-height: 1.8;
}
h5 {
font-size: 14px;
padding: 10px 0px;
}
article h2,
article h3,
article h4 {
margin-top: 15px;
margin-bottom: 15px;
}
/* MAKES PROPERTIES BE SEPARATED CLEARLY */
article h3 {
padding-bottom: 8px;
border-bottom: 2px solid #ddd;
}
/** IMAGES **/
img {
border-radius: var(--bs-border-radius);
box-shadow: var(--card-box-shadow);
}
/** NAVBAR **/
.navbar-brand > img {
border-radius: 0;
box-shadow: none;
color: var(--bs-nav-link-color);
}
[data-bs-theme='light'] nav.navbar {
background-color: var(--bs-primary-bg-subtle);
}
[data-bs-theme='dark'] nav.navbar {
background-color: var(--bs-tertiary-bg);
}
.navbar-nav > li > a {
border-radius: var(--border-radius-button);
transition: 200ms;
}
.navbar-nav a.nav-link:focus,
.navbar-nav a.nav-link:hover {
background-color: var(--bs-primary-border-subtle);
}
.navbar-nav .nav-link.active,
.navbar-nav .nav-link.show {
color: var(--bs-link-hover-color);
}
/** SEARCH AND FILTER **/
input.form-control {
border-radius: var(--border-radius-button);
}
form.filter {
margin: 0.3rem;
}
/** ALERTS **/
.alert {
padding: 0;
border: none;
box-shadow: var(--card-box-shadow);
}
.alert > p {
padding: 0.2rem 0.7rem 0.7rem 1rem;
}
.alert > ul {
margin-bottom: 0;
padding: 5px 40px;
}
.alert > h5 {
padding: 0.5rem 0.7rem 0.7rem 1rem;
border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
font-weight: bold;
text-transform: capitalize;
}
.alert-info {
color: var(--material-blue-dark);
background-color: var(--material-info-background);
}
[data-bs-theme='dark'] .alert-info {
color: var(--material-blue-light);
background-color: var(--material-info-background-dark);
}
.alert-info > h5 {
background-color: var(--material-info-header);
}
.alert-warning {
color: var(--material-yellow-dark);
background-color: var(--material-warning-background);
}
[data-bs-theme='dark'] .alert-warning {
color: var(--material-yellow-light);
background-color: var(--material-warning-background-dark);
}
.alert-warning > h5 {
background-color: var(--material-warning-header);
}
.alert-danger {
color: var(--material-red-dark);
background-color: var(--material-danger-background);
}
[data-bs-theme='dark'] .alert-danger {
color: var(--material-red-light);
background-color: var(--material-danger-background-dark);
}
.alert-danger > h5 {
background-color: var(--material-danger-header);
}
/* CODE HIGHLIGHT */
code {
border-radius: var(--bs-border-radius);
margin: 4px 2px;
box-shadow: var(--card-box-shadow);
}
/* MAKES DERIVED LIST READABLE */
:is(dl.typelist.derived, dl.typelist.extensionMethods) > dd > div::after {
content: none !important;
}
:is(dl.typelist.derived, dl.typelist.extensionMethods) > dd > div {
display: block !important;
}
/* MAKES "IN THIS ARTICLE" MORE READABLE */
.affix h5, .affix .h5 {
font-weight: normal !important;
}
/* MAKES INDEX LOGO VISIBLE ON DIFFERENT THEMES */
article[data-uid="Root.Landing"] img[alt="logo"] {
height: 100pt !important;
box-shadow: none;
}
[data-bs-theme="light"] article[data-uid="Root.Landing"] img[alt="logo"] {
content: url('/marketing/logo/SVG/Combinationmark.svg') !important;
}
[data-bs-theme="dark"] article[data-uid="Root.Landing"] img[alt="logo"] {
content: url('/marketing/logo/SVG/Combinationmark White.svg') !important;
}
/* MAKES SIDEBAR LINKS A BIT MORE DISTINGUISHABLE */
.affix ul li a {
display: block !important;
margin-left: 8px !important;
}

View File

@@ -0,0 +1,9 @@
export default {
iconLinks: [
{
icon: 'github',
href: 'https://github.com/discord-net/Discord.Net',
title: 'GitHub'
}
]
}

View File

@@ -4,14 +4,12 @@
"src": [
{
"src": "../src",
"files": ["**.csproj"]
"files": ["**/*.csproj"],
"exclude": ["Discord.Net.DebugTools/*.csproj"]
}
],
"dest": "api",
"filter": "filterConfig.yml",
"properties": {
"TargetFramework": "net5.0"
}
"filter": "filterConfig.yml"
}
],
"build": {
@@ -41,21 +39,21 @@
"langwordMapping.yml",
"marketing/logo/**.svg",
"marketing/logo/**.png",
"favicon.ico"
"favicon.ico",
"../src/Discord.Net.Examples/**.cs"
]
}
],
"dest": "_site",
"output": "_site",
"template": [
"default",
"_template/light-dark-theme",
"_template/last-modified",
"modern",
"_template/material",
"_template/description-generator"
],
"postProcessors": [
"ExtractSearchIndex",
"LastModifiedPostProcessor",
"DescriptionPostProcessor"
"DescriptionPostProcessor"
],
"overwrite": "_overwrites/**/**.md",
"globalMetadata": {
@@ -65,6 +63,6 @@
"_appLogoPath": "marketing/logo/SVG/Logomark Purple.svg",
"_appFaviconPath": "favicon.ico"
},
"xrefService": ["https://xref.docs.microsoft.com/query?uid={uid}"]
"xrefService": ["https://learn.microsoft.com/api/xref/query?uid={uid}"]
}
}

View File

@@ -43,7 +43,7 @@ If you are using `RunMode.Async` you need to setup your post-execution pipeline
Refer to the [documentation about preconditions]
[documentation about preconditions]: xref:Guides.ChatCommands.Preconditions
[documentation about preconditions]: xref:Guides.IntFw.Preconditions
## How do I send the HTTP Response from inside the command modules.

View File

@@ -23,7 +23,7 @@ The entity can be retrieved from cache by calling `GetOrDownloadAsync()` on the
> [!NOTE]
> GetOrDownloadAsync will download the entity if its not available directly from the cache.
[Cacheable]: xref:Discord.Cacheable
[Cacheable]: xref:Discord.Cacheable`2
## X, Y, Z does not work! It doesn't return a valid value anymore.

View File

@@ -66,4 +66,4 @@ Through the provider, we can ask for the DiscordSocketClient we registered earli
You can not only directly access the provider from a field or property, but you can also pass around instances to classes registered in the provider.
There are multiple ways to do this. Please refer to the
[Injection Documentation](Guides.DI.Injection) for further information.
[Injection Documentation](xref:Guides.DI.Injection) for further information.

View File

@@ -63,4 +63,4 @@ public async Task Spawn()
}
```
![](images\image1.png)
![](images/image1.png)

View File

@@ -5,7 +5,7 @@ title: Home
# Discord.NET Documentation
<div class="big-logo logo-switcher"></div>
![logo](marketing/logo/SVG/Combinationmark%20White%20Border.svg)
[![GitHub](https://img.shields.io/github/last-commit/discord-net/Discord.Net?style=plastic)](https://github.com/discord-net/Discord.Net)
[![NuGet](https://img.shields.io/nuget/vpre/Discord.Net.svg?maxAge=2592000?style=plastic)](https://www.nuget.org/packages/Discord.Net)
@@ -31,15 +31,8 @@ objects in the library.
## Nightlies
Nightlies are builds of Discord.NET that are still in an experimental phase, and have not been released.
These are not included in the main repository, and are instead taken over by [Discord.NET Labs].
Discord.NET Labs is an experimental fork of Discord.NET that implements the newest discord features
for testing and development to eventually get merged into Discord.NET.
[Installing Discord.NET Labs](xref:Guides.GettingStarted.Installation.Labs)
[Discord.Net Labs]: https://github.com/Discord-Net-Labs/Discord.Net-Labs
Nightlies are builds of Discord.NET that are still in an experimental phase, and have not been released.
They are available through Discord.NET's [MyGet feed](https://www.myget.org/F/discord-net/api/v3/index.json).
## Questions?

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<svg viewBox="0 0 951.34 234.2" xmlns="http://www.w3.org/2000/svg">
<svg height="100pt" viewBox="0 0 951.34 234.2" xmlns="http://www.w3.org/2000/svg">
<defs>
<style>.cls-1{fill:#68217a;}.cls-2{fill:#fff;}.cls-3{fill:#939;}</style>
</defs>
@@ -18,4 +18,4 @@
<rect class="cls-3" x="118.83" y="46.87" width="12.85" height="107.11" rx="4.91" transform="translate(12.2 214.42) rotate(-83.96)"/>
</g>
</g>
</svg>
</svg>

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 265.74 274.24"><defs><style>.cls-1{fill:#68217a;}.cls-2{fill:#939;}</style></defs><title>Discord.Net Docs</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M54.48.13,239.93,17.62A28.57,28.57,0,0,1,265.61,48.8L248,235.91a28.57,28.57,0,0,1-31.06,25.84L60,246.94,69.71,222l-19.27,14.8L32.23,250.75,0,274.24,23.42,26A28.56,28.56,0,0,1,54.48.13Z"/><rect class="cls-2" x="113.88" y="-22.58" width="16.56" height="138.01" rx="6.32" transform="translate(63.14 163.03) rotate(-83.96)"/><rect class="cls-2" x="157.3" y="20.84" width="16.56" height="138.01" rx="6.32" transform="translate(58.81 245.05) rotate(-83.96)"/><rect class="cls-2" x="100.92" y="99.96" width="16.56" height="138.01" rx="6.32" transform="translate(-70.32 259.78) rotate(-83.96)"/><rect class="cls-2" x="153.11" y="60.4" width="16.56" height="138.01" rx="6.32" transform="translate(15.73 276.29) rotate(-83.96)"/></g></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="38" height="38" viewBox="0 0 265.74 274.24"><defs><style>.cls-1{fill:#68217a;}.cls-2{fill:#939;}</style></defs><title>Discord.Net Docs</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M54.48.13,239.93,17.62A28.57,28.57,0,0,1,265.61,48.8L248,235.91a28.57,28.57,0,0,1-31.06,25.84L60,246.94,69.71,222l-19.27,14.8L32.23,250.75,0,274.24,23.42,26A28.56,28.56,0,0,1,54.48.13Z"/><rect class="cls-2" x="113.88" y="-22.58" width="16.56" height="138.01" rx="6.32" transform="translate(63.14 163.03) rotate(-83.96)"/><rect class="cls-2" x="157.3" y="20.84" width="16.56" height="138.01" rx="6.32" transform="translate(58.81 245.05) rotate(-83.96)"/><rect class="cls-2" x="100.92" y="99.96" width="16.56" height="138.01" rx="6.32" transform="translate(-70.32 259.78) rotate(-83.96)"/><rect class="cls-2" x="153.11" y="60.4" width="16.56" height="138.01" rx="6.32" transform="translate(15.73 276.29) rotate(-83.96)"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 996 B

After

Width:  |  Height:  |  Size: 1020 B

View File

@@ -8,4 +8,4 @@
href: api/
topicUid: API.Docs
- name: Changelog
topicHref: ../CHANGELOG.md
href: ../CHANGELOG.md

View File

@@ -108,12 +108,12 @@ namespace Discord
/// Adds or updates the permission overwrite for the given role.
/// </summary>
/// <example>
/// <para>The following example fetches a role via <see cref="IGuild.GetRole"/> and a channel via
/// <see cref="IGuild.GetChannelAsync"/>. Next, it checks if an overwrite had already been set via
/// <para>The following example fetches a role via <see cref="IGuild.GetRole"/> and a channel via
/// <see cref="IGuild.GetChannelAsync"/>. Next, it checks if an overwrite had already been set via
/// <see cref="GetPermissionOverwrite(Discord.IRole)"/>; if not, it denies the role from sending any
/// messages to the channel.</para>
/// <code language="cs" region="AddPermissionOverwriteAsyncRole"
/// source="..\..\..\Discord.Net.Examples\Core\Entities\Channels\IGuildChannel.Examples.cs"/>
/// source="../../../Discord.Net.Examples/Core/Entities/Channels/IGuildChannel.Examples.cs"/>
/// </example>
/// <param name="role">The role to add the overwrite to.</param>
/// <param name="permissions">The overwrite to add to the role.</param>
@@ -127,12 +127,12 @@ namespace Discord
/// Adds or updates the permission overwrite for the given user.
/// </summary>
/// <example>
/// <para>The following example fetches a user via <see cref="IGuild.GetUserAsync"/> and a channel via
/// <see cref="IGuild.GetChannelAsync"/>. Next, it checks if an overwrite had already been set via
/// <para>The following example fetches a user via <see cref="IGuild.GetUserAsync"/> and a channel via
/// <see cref="IGuild.GetChannelAsync"/>. Next, it checks if an overwrite had already been set via
/// <see cref="GetPermissionOverwrite(Discord.IUser)"/>; if not, it denies the user from sending any
/// messages to the channel.</para>
/// <code language="cs" region="AddPermissionOverwriteAsyncUser"
/// source="..\..\..\Discord.Net.Examples\Core\Entities\Channels\IGuildChannel.Examples.cs"/>
/// source="../../../Discord.Net.Examples/Core/Entities/Channels/IGuildChannel.Examples.cs"/>
/// </example>
/// <param name="user">The user to add the overwrite to.</param>
/// <param name="permissions">The overwrite to add to the user.</param>

View File

@@ -17,7 +17,7 @@ namespace Discord
/// <para>The following example sends a message with the current system time in RFC 1123 format to the channel and
/// deletes itself after 5 seconds.</para>
/// <code language="cs" region="SendMessageAsync"
/// source="..\..\..\Discord.Net.Examples\Core\Entities\Channels\IMessageChannel.Examples.cs" />
/// source="../../../Discord.Net.Examples/Core/Entities/Channels/IMessageChannel.Examples.cs" />
/// </example>
/// <param name="text">The message to be sent.</param>
/// <param name="isTTS">Determines whether the message should be read aloud by Discord or not.</param>
@@ -42,14 +42,14 @@ namespace Discord
/// Sends a file to this message channel with an optional caption.
/// </summary>
/// <example>
/// <para>The following example uploads a local file called <c>wumpus.txt</c> along with the text
/// <para>The following example uploads a local file called <c>wumpus.txt</c> along with the text
/// <c>good discord boi</c> to the channel.</para>
/// <code language="cs" region="SendFileAsync.FilePath"
/// source="..\..\..\Discord.Net.Examples\Core\Entities\Channels\IMessageChannel.Examples.cs" />
/// source="../../../Discord.Net.Examples/Core/Entities/Channels/IMessageChannel.Examples.cs" />
/// <para>The following example uploads a local image called <c>b1nzy.jpg</c> embedded inside a rich embed to the
/// channel.</para>
/// <code language="cs" region="SendFileAsync.FilePath.EmbeddedImage"
/// source="..\..\..\Discord.Net.Examples\Core\Entities\Channels\IMessageChannel.Examples.cs" />
/// source="../../../Discord.Net.Examples/Core/Entities/Channels/IMessageChannel.Examples.cs" />
/// </example>
/// <remarks>
/// This method sends a file as if you are uploading an attachment directly from your Discord client.
@@ -86,7 +86,7 @@ namespace Discord
/// <para>The following example uploads a streamed image that will be called <c>b1nzy.jpg</c> embedded inside a
/// rich embed to the channel.</para>
/// <code language="cs" region="SendFileAsync.FileStream.EmbeddedImage"
/// source="..\..\..\Discord.Net.Examples\Core\Entities\Channels\IMessageChannel.Examples.cs" />
/// source="../../../Discord.Net.Examples/Core/Entities/Channels/IMessageChannel.Examples.cs" />
/// </example>
/// <remarks>
/// This method sends a file as if you are uploading an attachment directly from your Discord client.
@@ -195,7 +195,7 @@ namespace Discord
/// </summary>
/// <remarks>
/// <note type="important">
/// The returned collection is an asynchronous enumerable object; one must call
/// The returned collection is an asynchronous enumerable object; one must call
/// <see cref="AsyncEnumerableExtensions.FlattenAsync{T}"/> to access the individual messages as a
/// collection.
/// </note>
@@ -204,17 +204,17 @@ namespace Discord
/// rate limit, causing your bot to freeze!
/// </note>
/// This method will attempt to fetch the number of messages specified under <paramref name="limit"/>. The
/// library will attempt to split up the requests according to your <paramref name="limit"/> and
/// library will attempt to split up the requests according to your <paramref name="limit"/> and
/// <see cref="DiscordConfig.MaxMessagesPerBatch"/>. In other words, should the user request 500 messages,
/// and the <see cref="Discord.DiscordConfig.MaxMessagesPerBatch"/> constant is <c>100</c>, the request will
/// be split into 5 individual requests; thus returning 5 individual asynchronous responses, hence the need
/// of flattening.
/// </remarks>
/// <example>
/// <para>The following example downloads 300 messages and gets messages that belong to the user
/// <para>The following example downloads 300 messages and gets messages that belong to the user
/// <c>53905483156684800</c>.</para>
/// <code language="cs" region="GetMessagesAsync.FromLimit.Standard"
/// source="..\..\..\Discord.Net.Examples\Core\Entities\Channels\IMessageChannel.Examples.cs" />
/// source="../../../Discord.Net.Examples/Core/Entities/Channels/IMessageChannel.Examples.cs" />
/// </example>
/// <param name="limit">The numbers of message to be gotten from.</param>
/// <param name="mode">The <see cref="CacheMode" /> that determines whether the object should be fetched from
@@ -230,7 +230,7 @@ namespace Discord
/// </summary>
/// <remarks>
/// <note type="important">
/// The returned collection is an asynchronous enumerable object; one must call
/// The returned collection is an asynchronous enumerable object; one must call
/// <see cref="AsyncEnumerableExtensions.FlattenAsync{T}"/> to access the individual messages as a
/// collection.
/// </note>
@@ -240,7 +240,7 @@ namespace Discord
/// </note>
/// This method will attempt to fetch the number of messages specified under <paramref name="limit"/> around
/// the message <paramref name="fromMessageId"/> depending on the <paramref name="dir"/>. The library will
/// attempt to split up the requests according to your <paramref name="limit"/> and
/// attempt to split up the requests according to your <paramref name="limit"/> and
/// <see cref="DiscordConfig.MaxMessagesPerBatch"/>. In other words, should the user request 500 messages,
/// and the <see cref="Discord.DiscordConfig.MaxMessagesPerBatch"/> constant is <c>100</c>, the request will
/// be split into 5 individual requests; thus returning 5 individual asynchronous responses, hence the need
@@ -249,11 +249,11 @@ namespace Discord
/// <example>
/// <para>The following example gets 5 message prior to the message identifier <c>442012544660537354</c>.</para>
/// <code language="cs" region="GetMessagesAsync.FromId.FromMessage"
/// source="..\..\..\Discord.Net.Examples\Core\Entities\Channels\IMessageChannel.Examples.cs" />
/// <para>The following example attempts to retrieve <c>messageCount</c> number of messages from the
/// source="../../../Discord.Net.Examples/Core/Entities/Channels/IMessageChannel.Examples.cs" />
/// <para>The following example attempts to retrieve <c>messageCount</c> number of messages from the
/// beginning of the channel and prints them to the console.</para>
/// <code language="cs" region="GetMessagesAsync.FromId.BeginningMessages"
/// source="..\..\..\Discord.Net.Examples\Core\Entities\Channels\IMessageChannel.Examples.cs" />
/// source="../../../Discord.Net.Examples/Core/Entities/Channels/IMessageChannel.Examples.cs" />
/// </example>
/// <param name="fromMessageId">The ID of the starting message to get the messages from.</param>
/// <param name="dir">The direction of the messages to be gotten from.</param>
@@ -271,7 +271,7 @@ namespace Discord
/// </summary>
/// <remarks>
/// <note type="important">
/// The returned collection is an asynchronous enumerable object; one must call
/// The returned collection is an asynchronous enumerable object; one must call
/// <see cref="AsyncEnumerableExtensions.FlattenAsync{T}"/> to access the individual messages as a
/// collection.
/// </note>
@@ -281,7 +281,7 @@ namespace Discord
/// </note>
/// This method will attempt to fetch the number of messages specified under <paramref name="limit"/> around
/// the message <paramref name="fromMessage"/> depending on the <paramref name="dir"/>. The library will
/// attempt to split up the requests according to your <paramref name="limit"/> and
/// attempt to split up the requests according to your <paramref name="limit"/> and
/// <see cref="DiscordConfig.MaxMessagesPerBatch"/>. In other words, should the user request 500 messages,
/// and the <see cref="Discord.DiscordConfig.MaxMessagesPerBatch"/> constant is <c>100</c>, the request will
/// be split into 5 individual requests; thus returning 5 individual asynchronous responses, hence the need
@@ -290,7 +290,7 @@ namespace Discord
/// <example>
/// <para>The following example gets 5 message prior to a specific message, <c>oldMessage</c>.</para>
/// <code language="cs" region="GetMessagesAsync.FromMessage"
/// source="..\..\..\Discord.Net.Examples\Core\Entities\Channels\IMessageChannel.Examples.cs" />
/// source="../../../Discord.Net.Examples/Core/Entities/Channels/IMessageChannel.Examples.cs" />
/// </example>
/// <param name="fromMessage">The starting message to get the messages from.</param>
/// <param name="dir">The direction of the messages to be gotten from.</param>
@@ -360,7 +360,7 @@ namespace Discord
/// <example>
/// <para>The following example keeps the client in the typing state until <c>LongRunningAsync</c> has finished.</para>
/// <code language="cs" region="EnterTypingState"
/// source="..\..\..\Discord.Net.Examples\Core\Entities\Channels\IMessageChannel.Examples.cs" />
/// source="../../../Discord.Net.Examples/Core/Entities/Channels/IMessageChannel.Examples.cs" />
/// </example>
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>

View File

@@ -790,7 +790,7 @@ namespace Discord
/// <example>
/// <para>The following example creates a new text channel under an existing category named <c>Wumpus</c> with a set topic.</para>
/// <code language="cs" region="CreateTextChannelAsync"
/// source="..\..\..\Discord.Net.Examples\Core\Entities\Guilds\IGuild.Examples.cs"/>
/// source="../../../Discord.Net.Examples/Core/Entities/Guilds/IGuild.Examples.cs"/>
/// </example>
/// <param name="name">The new name for the text channel.</param>
/// <param name="func">The delegate containing the properties to be applied to the channel upon its creation.</param>

View File

@@ -19,6 +19,13 @@ namespace Discord
/// If you wish to retrieve the display avatar for this user, consider using <see cref="GetDisplayAvatarUrl"/>.
/// </note>
/// </remarks>
/// <example>
/// <para
/// >The following example attempts to retrieve the user's current avatar and send it to a channel; if one is
/// not set, a default avatar for this user will be returned instead.</para>
/// <code language="cs" region="GetAvatarUrl"
/// source="../../../Discord.Net.Examples/Core/Entities/Users/IUser.Examples.cs"/>
/// </example>
/// <param name="format">The format of the image.</param>
/// <param name="size">The size of the image that matches any power of two, ranging from 16 to 2048.</param>
/// <returns>

View File

@@ -959,25 +959,6 @@ namespace Discord.Rest
=> GuildHelper.GetUserAsync(this, Discord, OwnerId, options);
/// <inheritdoc />
/// <summary>
/// Prunes inactive users.
/// </summary>
/// <remarks>
/// <para>
/// This method removes all users that have not logged on in the provided number of <paramref name="days"/>.
/// </para>
/// <para>
/// If <paramref name="simulate" /> is <see langword="true" />, this method will only return the number of users that
/// would be removed without kicking the users.
/// </para>
/// </remarks>
/// <param name="days">The number of days required for the users to be kicked.</param>
/// <param name="simulate">Whether this prune action is a simulation.</param>
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>
/// A task that represents the asynchronous prune operation. The task result contains the number of users to
/// be or has been removed from this guild.
/// </returns>
public Task<int> PruneUsersAsync(int days = 30, bool simulate = false, RequestOptions options = null, IEnumerable<ulong> includeRoleIds = null)
=> GuildHelper.PruneUsersAsync(this, Discord, days, simulate, options, includeRoleIds);

View File

@@ -23,7 +23,7 @@ namespace Discord.WebSocket
/// </remarks>
/// <example>
/// <code language="cs" region="ChannelCreated"
/// source="..\Discord.Net.Examples\WebSocket\BaseSocketClient.Events.Examples.cs"/>
/// source="../Discord.Net.Examples/WebSocket/BaseSocketClient.Events.Examples.cs"/>
/// </example>
public event Func<SocketChannel, Task> ChannelCreated
{
@@ -45,7 +45,7 @@ namespace Discord.WebSocket
/// </remarks>
/// <example>
/// <code language="cs" region="ChannelDestroyed"
/// source="..\Discord.Net.Examples\WebSocket\BaseSocketClient.Events.Examples.cs"/>
/// source="../Discord.Net.Examples/WebSocket/BaseSocketClient.Events.Examples.cs"/>
/// </example>
public event Func<SocketChannel, Task> ChannelDestroyed
{
@@ -68,7 +68,7 @@ namespace Discord.WebSocket
/// </remarks>
/// <example>
/// <code language="cs" region="ChannelUpdated"
/// source="..\Discord.Net.Examples\WebSocket\BaseSocketClient.Events.Examples.cs"/>
/// source="../Discord.Net.Examples/WebSocket/BaseSocketClient.Events.Examples.cs"/>
/// </example>
public event Func<SocketChannel, SocketChannel, Task> ChannelUpdated
{
@@ -111,7 +111,7 @@ namespace Discord.WebSocket
/// <example>
/// <para>The example below checks if the newly received message contains the target user.</para>
/// <code language="cs" region="MessageReceived"
/// source="..\Discord.Net.Examples\WebSocket\BaseSocketClient.Events.Examples.cs"/>
/// source="../Discord.Net.Examples/WebSocket/BaseSocketClient.Events.Examples.cs"/>
/// </example>
public event Func<SocketMessage, Task> MessageReceived
{
@@ -144,7 +144,7 @@ namespace Discord.WebSocket
/// </remarks>
/// <example>
/// <code language="cs" region="MessageDeleted"
/// source="..\Discord.Net.Examples\WebSocket\BaseSocketClient.Events.Examples.cs" />
/// source="../Discord.Net.Examples/WebSocket/BaseSocketClient.Events.Examples.cs" />
/// </example>
public event Func<Cacheable<IMessage, ulong>, Cacheable<IMessageChannel, ulong>, Task> MessageDeleted
@@ -240,7 +240,7 @@ namespace Discord.WebSocket
/// </remarks>
/// <example>
/// <code language="cs" region="ReactionAdded"
/// source="..\Discord.Net.Examples\WebSocket\BaseSocketClient.Events.Examples.cs"/>
/// source="../Discord.Net.Examples/WebSocket/BaseSocketClient.Events.Examples.cs"/>
/// </example>
public event Func<Cacheable<IUserMessage, ulong>, Cacheable<IMessageChannel, ulong>, SocketReaction, Task> ReactionAdded
{