Improve and modernize docs. (#2882)
* Add proper home landing page. * Improve landing page considerably. * Add navbar library name. * Fix css rules. * Update getting started images. * Change favicon to the navbar's logo. * Tiny change to docs index. * Add title to home landing page. * Tweak build overrides faq page. * Fix FAQ article titles and headers. * Fix FAQ article titles and headers. * Replace channel 9 with the official .net course.
11
docs/_template/material/public/main.css
vendored
@@ -77,6 +77,7 @@ img {
|
|||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
color: var(--bs-nav-link-color);
|
color: var(--bs-nav-link-color);
|
||||||
|
margin-right: var(--bs-navbar-brand-margin-end);
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-bs-theme='light'] nav.navbar {
|
[data-bs-theme='light'] nav.navbar {
|
||||||
@@ -215,19 +216,23 @@ ul:not(.navbar-nav) > li:not(:last-child) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* MAKES INDEX LOGO VISIBLE ON DIFFERENT THEMES */
|
/* MAKES INDEX LOGO VISIBLE ON DIFFERENT THEMES */
|
||||||
article[data-uid="Root.Landing"] img[alt="logo"] {
|
article[data-uid="Home.Landing"] img[alt="logo"] {
|
||||||
height: 100pt !important;
|
height: 100pt !important;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-bs-theme="light"] article[data-uid="Root.Landing"] img[alt="logo"] {
|
[data-bs-theme="light"] article[data-uid="Home.Landing"] img[alt="logo"] {
|
||||||
content: url('/marketing/logo/SVG/Combinationmark.svg') !important;
|
content: url('/marketing/logo/SVG/Combinationmark.svg') !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-bs-theme="dark"] article[data-uid="Root.Landing"] img[alt="logo"] {
|
[data-bs-theme="dark"] article[data-uid="Home.Landing"] img[alt="logo"] {
|
||||||
content: url('/marketing/logo/SVG/Combinationmark White.svg') !important;
|
content: url('/marketing/logo/SVG/Combinationmark White.svg') !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
article[data-uid="Home.Landing"] img {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* MAKES SIDEBAR LINKS A BIT MORE DISTINGUISHABLE */
|
/* MAKES SIDEBAR LINKS A BIT MORE DISTINGUISHABLE */
|
||||||
.affix ul li a:not(.link-body-emphasis) {
|
.affix ul li a:not(.link-body-emphasis) {
|
||||||
display: block !important;
|
display: block !important;
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ uid: API.Docs
|
|||||||
|
|
||||||
# API Documentation
|
# API Documentation
|
||||||
|
|
||||||
This is where you will find documentation for all members and objects in Discord.Net.
|
This is where you will find documentation for all members and objects in Discord.Net.
|
||||||
|
This is automatically generated based on the [dev](https://github.com/discord-net/Discord.Net/tree/dev) branch.
|
||||||
|
|
||||||
# Commonly Used Entities
|
# Commonly Used Entities
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
"langwordMapping.yml",
|
"langwordMapping.yml",
|
||||||
"marketing/logo/**.svg",
|
"marketing/logo/**.svg",
|
||||||
"marketing/logo/**.png",
|
"marketing/logo/**.png",
|
||||||
"favicon.ico",
|
"favicon.png",
|
||||||
"../src/Discord.Net.Examples/**.cs"
|
"../src/Discord.Net.Examples/**.cs"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -58,10 +58,11 @@
|
|||||||
"overwrite": "_overwrites/**/**.md",
|
"overwrite": "_overwrites/**/**.md",
|
||||||
"globalMetadata": {
|
"globalMetadata": {
|
||||||
"_appTitle": "Discord.Net Documentation",
|
"_appTitle": "Discord.Net Documentation",
|
||||||
|
"_appName": "Discord.Net",
|
||||||
"_appFooter": "Discord.Net © 2015-2024 3.13.1",
|
"_appFooter": "Discord.Net © 2015-2024 3.13.1",
|
||||||
"_enableSearch": true,
|
"_enableSearch": true,
|
||||||
"_appLogoPath": "marketing/logo/SVG/Logomark Purple.svg",
|
"_appLogoPath": "marketing/logo/SVG/Logomark Purple.svg",
|
||||||
"_appFaviconPath": "favicon.ico"
|
"_appFaviconPath": "favicon.png"
|
||||||
},
|
},
|
||||||
"xref": ["https://github.com/dotnet/docfx/raw/main/.xrefmap.json"]
|
"xref": ["https://github.com/dotnet/docfx/raw/main/.xrefmap.json"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
uid: FAQ.Basics.BasicOp
|
uid: FAQ.Basics.BasicOp
|
||||||
title: Questions about Basic Operations
|
title: Basic Operations Questions
|
||||||
---
|
---
|
||||||
|
|
||||||
# Basic Operations Questions
|
# Basic Operations Questions
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
uid: FAQ.Basics.ClientBasics
|
uid: FAQ.Basics.ClientBasics
|
||||||
title: Basic Questions about Client
|
title: Client Basics Questions
|
||||||
---
|
---
|
||||||
|
|
||||||
# Client Basics Questions
|
# Client Basics Questions
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
uid: FAQ.Basics.DI
|
uid: FAQ.Basics.DI
|
||||||
title: Questions about Dependency Injection.
|
title: Questions about Dependency Injection
|
||||||
---
|
---
|
||||||
|
|
||||||
# Dependency-injection-related Questions
|
# Dependency Injection-related Questions
|
||||||
|
|
||||||
In the following section, you will find common questions and answers
|
In the following section, you will find common questions and answers
|
||||||
to utilizing dependency injection with @Discord.Commands and @Discord.Interactions, as well as
|
to utilizing dependency injection with @Discord.Commands and @Discord.Interactions, as well as
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
---
|
---
|
||||||
uid: FAQ.Basics.GetStarted
|
uid: FAQ.Basics.GetStarted
|
||||||
title: Beginner Questions / How to Get Started
|
title: Getting Started
|
||||||
---
|
---
|
||||||
|
|
||||||
# Basic Concepts / Getting Started
|
# Getting Started
|
||||||
|
|
||||||
In this following section, you will find commonly asked questions and
|
In this following section, you will find commonly asked questions and
|
||||||
answers about how to get started with Discord.Net, as well as basic
|
answers about how to get started with Discord.Net, as well as basic
|
||||||
introduction to the Discord API ecosystem.
|
introduction to the Discord API ecosystem.
|
||||||
|
|
||||||
## How do I add my bot to my server/guild?
|
## How do I add my bot to my guild?
|
||||||
|
|
||||||
Inviting your bot can be done by using the OAuth2 url generator provided by the [Discord Developer Portal].
|
Inviting your bot can be done by using the OAuth2 url generator provided by the [Discord Developer Portal].
|
||||||
|
|
||||||
@@ -86,10 +86,10 @@ it will return the user ID of the aforementioned user.
|
|||||||
> Right-clicking on the role and copying the ID will **not** work.
|
> Right-clicking on the role and copying the ID will **not** work.
|
||||||
> This will only copy the message ID.
|
> This will only copy the message ID.
|
||||||
|
|
||||||
Several common ways to do this:
|
There are several common ways to do this:
|
||||||
|
|
||||||
1. (Easiest) Right click on the role either in the Server Settings
|
1. Right click on the role either in the Server Settings
|
||||||
or in the user's role list.
|
or in the user's role list (recommended).
|
||||||

|

|
||||||
2. Make the role mentionable and mention the role, and escape it
|
2. Make the role mentionable and mention the role, and escape it
|
||||||
using the `\` character in front.
|
using the `\` character in front.
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 52 KiB |
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
uid: FAQ.BuildOverrides.WhatAreThey
|
uid: FAQ.BuildOverrides.WhatAreThey
|
||||||
title: Build Overrides, What are they?
|
title: Build Overrides
|
||||||
---
|
---
|
||||||
|
|
||||||
# Build Overrides
|
# Build Overrides
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
uid: FAQ.Interactions.General
|
uid: FAQ.Interactions.General
|
||||||
title: Interactions
|
title: Interaction Basics
|
||||||
---
|
---
|
||||||
|
|
||||||
# Interaction basics
|
# Interaction Basics
|
||||||
|
|
||||||
This chapter mostly refers to interactions in general,
|
This chapter mostly refers to interactions in general,
|
||||||
and will include questions that are common among users of the Interaction Framework
|
and will include questions that are common among users of the Interaction Framework
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
uid: FAQ.Interactions.Manual
|
uid: FAQ.Interactions.Manual
|
||||||
title: Manual handling
|
title: Manual Handling
|
||||||
---
|
---
|
||||||
|
|
||||||
# Manually handing interactions.
|
# Manually Handling Interactions
|
||||||
|
|
||||||
This section talks about the manual building and responding to interactions.
|
This section talks about the manual building and responding to interactions.
|
||||||
If you are using the interaction framework (highly recommended) this section does not apply to you.
|
If you are using the interaction framework (highly recommended) this section does not apply to you.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
uid: FAQ.Interactions.RespondingSchemes
|
uid: FAQ.Interactions.RespondingSchemes
|
||||||
title: Interaction response schemes
|
title: Interaction Response Schemes
|
||||||
---
|
---
|
||||||
|
|
||||||
# Interaction Response Schemes
|
# Interaction Response Schemes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
uid: FAQ.Legacy
|
uid: FAQ.Legacy
|
||||||
title: Questions about Legacy Versions
|
title: Legacy Questions
|
||||||
---
|
---
|
||||||
|
|
||||||
# Legacy Questions
|
# Legacy Questions
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
items:
|
items:
|
||||||
- name: Text Command basics
|
- name: Text Command basics
|
||||||
topicUid: FAQ.TextCommands.General
|
topicUid: FAQ.TextCommands.General
|
||||||
- name: Legacy or Upgrade
|
- name: Legacy Questions
|
||||||
topicUid: FAQ.Legacy
|
topicUid: FAQ.Legacy
|
||||||
- name: Build Overrides
|
- name: Build Overrides
|
||||||
topicUid: FAQ.BuildOverrides.WhatAreThey
|
topicUid: FAQ.BuildOverrides.WhatAreThey
|
||||||
|
|||||||
BIN
docs/favicon.ico
|
Before Width: | Height: | Size: 17 KiB |
BIN
docs/favicon.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
@@ -28,7 +28,7 @@ in [our GitHub repository].
|
|||||||
[polymorphism]: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/polymorphism
|
[polymorphism]: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/polymorphism
|
||||||
[interface]: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/interfaces/
|
[interface]: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/interfaces/
|
||||||
|
|
||||||
## New to .NET/C#?
|
## New to .NET?
|
||||||
|
|
||||||
All examples or snippets featured in this guide and all API
|
All examples or snippets featured in this guide and all API
|
||||||
documentation will be written in C#.
|
documentation will be written in C#.
|
||||||
@@ -38,9 +38,9 @@ difficult, but don't worry! There are many resources online that can
|
|||||||
help you get started in the wonderful world of .NET. Here are some
|
help you get started in the wonderful world of .NET. Here are some
|
||||||
resources to get you started.
|
resources to get you started.
|
||||||
|
|
||||||
- [C# Programming Guide (MSDN/Microsoft, Free)](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/)
|
- [C# Programming Guide](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/) (Microsoft, Free)
|
||||||
- [C# Fundamentals For Absolute Beginners (Channel9/Microsoft, Free)](https://channel9.msdn.com/Series/C-Fundamentals-for-Absolute-Beginners)
|
- [Learn .NET](https://dotnet.microsoft.com/en-us/learn) (Microsoft, Free)
|
||||||
- [C# Path (Pluralsight, Paid)](https://www.pluralsight.com/paths/csharp)
|
- [C# Path](https://www.pluralsight.com/paths/csharp) (Pluralsight, Paid)
|
||||||
|
|
||||||
## Still have questions?
|
## Still have questions?
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,20 @@
|
|||||||
---
|
---
|
||||||
uid: Root.Landing
|
uid: Home.Landing
|
||||||
title: Home
|
title: Home
|
||||||
|
_layout: landing
|
||||||
---
|
---
|
||||||
|
|
||||||
# Discord.NET Documentation
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
[](https://github.com/discord-net/Discord.Net)
|
[](https://github.com/discord-net/Discord.Net)
|
||||||
[](https://www.nuget.org/packages/Discord.Net)
|
[](https://www.nuget.org/packages/Discord.Net)
|
||||||
[](https://www.myget.org/feed/Packages/discord-net)
|
[](https://www.myget.org/feed/Packages/discord-net)
|
||||||
[](https://dev.azure.com/discord-net/Discord.Net/_build/latest?definitionId=1&branchName=dev)
|
[](https://dev.azure.com/discord-net/Discord.Net/_build/latest?definitionId=1&branchName=dev)
|
||||||
[](https://discord.gg/dnet)
|
[](https://discord.gg/dnet)
|
||||||
|
|
||||||
## What is Discord.NET?
|
## What is Discord.NET?
|
||||||
|
|
||||||
Discord.Net is an asynchronous, multi-platform .NET Library used to
|
Discord.Net is an unofficial asynchronous, multi-platform .NET library used to
|
||||||
interface with the [Discord API](https://discord.com/).
|
interface with the [Discord API](https://discord.com/).
|
||||||
|
|
||||||
## Where to begin?
|
## Where to begin?
|
||||||
@@ -32,7 +31,13 @@ objects in the library.
|
|||||||
## Nightlies
|
## Nightlies
|
||||||
|
|
||||||
Nightlies are builds of Discord.NET that are still in an experimental phase, and have not been released.
|
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).
|
They are available through 3 different sources:
|
||||||
|
- [MyGet](https://www.myget.org/F/discord-net/api/v3/index.json)
|
||||||
|
- [BaGet](https://baget.discordnet.dev/)
|
||||||
|
- [GitHub Packages](https://github.com/orgs/discord-net/packages?repo_name=Discord.Net)
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> GitHub Packages requires authentication. You can find more information [here](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry#authenticating-to-github-packages).
|
||||||
|
|
||||||
## Questions?
|
## Questions?
|
||||||
|
|
||||||
@@ -45,40 +50,8 @@ If you still have unanswered questions after reading the [FAQ](xref:FAQ.Basics.G
|
|||||||
## Supporting Discord.Net
|
## Supporting Discord.Net
|
||||||
|
|
||||||
Discord.Net is an MIT-licensed open source project with its development made possible entirely by volunteers.
|
Discord.Net is an MIT-licensed open source project with its development made possible entirely by volunteers.
|
||||||
If you'd like to support our efforts financially, please consider:
|
If you'd like to support our efforts financially, please consider contributing on:
|
||||||
|
|
||||||
- [Contributing on Open Collective](https://opencollective.com/discordnet).
|
- [Open Collective](https://opencollective.com/discordnet)
|
||||||
|
- [GitHub Sponsors](https://github.com/sponsors/quinchs)
|
||||||
## New in V3
|
- [PayPal](https://paypal.me/quinchs)
|
||||||
|
|
||||||
#### Interaction Framework
|
|
||||||
|
|
||||||
A counterpart to the well-known command service of Discord.Net, the Interaction Framework implements the same
|
|
||||||
feature-rich structure to register & handle interactions like application commands & buttons.
|
|
||||||
|
|
||||||
- Read about the Interaction Framework
|
|
||||||
[here](xref:Guides.IntFw.Intro)
|
|
||||||
|
|
||||||
#### Slash Commands
|
|
||||||
|
|
||||||
Slash commands are purposed to take over the normal prefixed commands in Discord and comes with good functionality to serve as a replacement.
|
|
||||||
Being interactions, they are handled as SocketInteractions. Creating and receiving slash commands is covered below.
|
|
||||||
|
|
||||||
- Find out more about slash commands in the
|
|
||||||
[Slash Command Guides](xref:Guides.SlashCommands.Intro)
|
|
||||||
|
|
||||||
#### Context Message & User Commands
|
|
||||||
|
|
||||||
These commands can be pointed at messages and users, in custom application tabs.
|
|
||||||
Being interactions as well, they are able to be handled just like slash commands. They do not have options however.
|
|
||||||
|
|
||||||
- Learn how to create and handle these commands in the
|
|
||||||
[Context Command Guides](xref:Guides.ContextCommands.Creating)
|
|
||||||
|
|
||||||
#### Message Components
|
|
||||||
|
|
||||||
Components of a message such as buttons and dropdowns, which can be interacted with and responded to.
|
|
||||||
Message components can be set in rows and multiple can exist on a single message!
|
|
||||||
|
|
||||||
- Explanation on how to add & respond to message components can be found in the
|
|
||||||
[Message Component Guides](xref:Guides.MessageComponents.Intro)
|
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
|
- name: Home
|
||||||
|
href: index.md
|
||||||
|
- name: Documentation
|
||||||
|
href: api/
|
||||||
|
topicUid: API.Docs
|
||||||
- name: Guides
|
- name: Guides
|
||||||
href: guides/
|
href: guides/
|
||||||
topicUid: Guides.Introduction
|
topicUid: Guides.Introduction
|
||||||
- name: FAQ
|
- name: FAQ
|
||||||
href: faq/
|
href: faq/
|
||||||
topicUid: FAQ.Basics.GetStarted
|
topicUid: FAQ.Basics.GetStarted
|
||||||
- name: API Documentation
|
|
||||||
href: api/
|
|
||||||
topicUid: API.Docs
|
|
||||||
- name: Changelog
|
- name: Changelog
|
||||||
href: ../CHANGELOG.md
|
href: ../CHANGELOG.md
|
||||||
|
|||||||