Skip to content

Commit fd3810e

Browse files
Still34foxbot
authored andcommitted
docs: September 2019 Documentation Update (#1379)
* docs: adjust wording of ActivityType.Watching enum Adjusts the xmldoc summary wording of the ActivityType.Watching enum to fix a wording issue. * Add D.NET Logo to Open Graph meta tags * Update DescriptionGenerator ...And update color to suit the logo better * Disable smooth scrolling due to user complaints * Remove unnecessary spacing in sideaffix * Update footer version * Remove featherlight plugin As it is unnecessary and can break image tags * Adjust wordings regarding safe-handling of secrets * Fix formatting for first bot token sample * Add badges to homepage * Minor wording fixes on terminal * Update to higher quality PNG * Add Discord.Net.Example in sln for build validation * Clarify all instances of IAsnycEnumerable * Clarify overridden props in SocketNewsChannel * Add returns and params docs for SyncPermissionsAsync * Remove/fix invalid XMLdoc strings * Remove AppVeyor and add GitHub badge
1 parent 7b9029d commit fd3810e

File tree

23 files changed

+165
-127
lines changed

23 files changed

+165
-127
lines changed

Discord.Net.sln

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Discord.Net.Tests.Integrati
3636
EndProject
3737
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{C7CF5621-7D36-433B-B337-5A2E3C101A71}"
3838
EndProject
39-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Discord.Net.Analyzers.Tests", "test\Discord.Net.Analyzers.Tests\Discord.Net.Analyzers.Tests.csproj", "{FC67057C-E92F-4E1C-98BE-46F839C8AD71}"
39+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Discord.Net.Analyzers.Tests", "test\Discord.Net.Analyzers.Tests\Discord.Net.Analyzers.Tests.csproj", "{FC67057C-E92F-4E1C-98BE-46F839C8AD71}"
40+
EndProject
41+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Discord.Net.Examples", "src\Discord.Net.Examples\Discord.Net.Examples.csproj", "{47820065-3CFB-401C-ACEA-862BD564A404}"
4042
EndProject
4143
Global
4244
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -204,6 +206,18 @@ Global
204206
{FC67057C-E92F-4E1C-98BE-46F839C8AD71}.Release|x64.Build.0 = Release|Any CPU
205207
{FC67057C-E92F-4E1C-98BE-46F839C8AD71}.Release|x86.ActiveCfg = Release|Any CPU
206208
{FC67057C-E92F-4E1C-98BE-46F839C8AD71}.Release|x86.Build.0 = Release|Any CPU
209+
{47820065-3CFB-401C-ACEA-862BD564A404}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
210+
{47820065-3CFB-401C-ACEA-862BD564A404}.Debug|Any CPU.Build.0 = Debug|Any CPU
211+
{47820065-3CFB-401C-ACEA-862BD564A404}.Debug|x64.ActiveCfg = Debug|Any CPU
212+
{47820065-3CFB-401C-ACEA-862BD564A404}.Debug|x64.Build.0 = Debug|Any CPU
213+
{47820065-3CFB-401C-ACEA-862BD564A404}.Debug|x86.ActiveCfg = Debug|Any CPU
214+
{47820065-3CFB-401C-ACEA-862BD564A404}.Debug|x86.Build.0 = Debug|Any CPU
215+
{47820065-3CFB-401C-ACEA-862BD564A404}.Release|Any CPU.ActiveCfg = Release|Any CPU
216+
{47820065-3CFB-401C-ACEA-862BD564A404}.Release|Any CPU.Build.0 = Release|Any CPU
217+
{47820065-3CFB-401C-ACEA-862BD564A404}.Release|x64.ActiveCfg = Release|Any CPU
218+
{47820065-3CFB-401C-ACEA-862BD564A404}.Release|x64.Build.0 = Release|Any CPU
219+
{47820065-3CFB-401C-ACEA-862BD564A404}.Release|x86.ActiveCfg = Release|Any CPU
220+
{47820065-3CFB-401C-ACEA-862BD564A404}.Release|x86.Build.0 = Release|Any CPU
207221
EndGlobalSection
208222
GlobalSection(SolutionProperties) = preSolution
209223
HideSolutionNode = FALSE
@@ -221,6 +235,7 @@ Global
221235
{DBF8B16E-5967-4480-8EDE-15D98A0DF0C4} = {C7CF5621-7D36-433B-B337-5A2E3C101A71}
222236
{E169E15A-E82C-45BF-8C24-C2CADB7093AA} = {C7CF5621-7D36-433B-B337-5A2E3C101A71}
223237
{FC67057C-E92F-4E1C-98BE-46F839C8AD71} = {C7CF5621-7D36-433B-B337-5A2E3C101A71}
238+
{47820065-3CFB-401C-ACEA-862BD564A404} = {BB59D5B5-E7B0-4BF4-8F82-D14431B2799B}
224239
EndGlobalSection
225240
GlobalSection(ExtensibilityGlobals) = postSolution
226241
SolutionGuid = {D2404771-EEC8-45F2-9D71-F3373F6C1495}

docs/_template/light-dark-theme/partials/head.tmpl.partial

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,18 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
66
<title>{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}</title>
77
<meta name="viewport" content="width=device-width">
8-
<meta name="title" content="{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}">
8+
<meta property="og:title" content="{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}">
9+
{{#_description}}<meta property="og:description" content="{{_description}}">{{/_description}}
10+
<meta property="og:locale" content="en-us">
11+
<meta property="og:type" content="website">
12+
<meta property="og:site_name" content="Discord.Net Docs">
13+
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/discord-net/Discord.Net/docs/marketing/logo/PackageLogo.png">
14+
<meta property="og:image:alt" content="Discord.Net Logo">
15+
<meta name="theme-color" content="#995EA7"/>
916
<meta name="generator" content="docfx {{_docfxVersion}}">
10-
{{#_description}}<meta name="description" content="{{_description}}">{{/_description}}
17+
<meta property="docfx:navrel" content="{{_navRel}}">
18+
<meta property="docfx:tocrel" content="{{_tocRel}}">
19+
<meta id="docfx-style:rel" content="{{_rel}}">
1120
<link rel="preload" href="{{_rel}}styles/search-worker.js" as="script">
1221
<link rel="preload" href="{{_rel}}fonts/glyphicons-halflings-regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
1322
<link rel="shortcut icon" href="{{_rel}}{{{_appFaviconPath}}}{{^_appFaviconPath}}favicon.ico{{/_appFaviconPath}}">
@@ -18,10 +27,6 @@
1827
<link rel="stylesheet" href="{{_rel}}styles/material.css">
1928
<link rel="stylesheet" href="{{_rel}}styles/theme-switcher.css">
2029
<link href="https://cdn.rawgit.com/noelboss/featherlight/1.7.6/release/featherlight.min.css" type="text/css" rel="stylesheet" />
21-
<meta name="theme-color" content="#99AAB5"/>
22-
<meta property="docfx:navrel" content="{{_navRel}}">
23-
<meta property="docfx:tocrel" content="{{_tocRel}}">
24-
<meta id="docfx-style:rel" content="{{_rel}}">
2530
{{#_noindex}}<meta name="searchOption" content="noindex">{{/_noindex}}
2631
{{#_enableSearch}}<meta property="docfx:rel" content="{{_rel}}">{{/_enableSearch}}
2732
{{#_enableNewTab}}<meta property="docfx:newtab" content="true">{{/_enableNewTab}}

docs/_template/light-dark-theme/partials/scripts.tmpl.partial

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
<script type="text/javascript" src="{{_rel}}styles/docfx.vendor.js"></script>
44
<script type="text/javascript" src="{{_rel}}styles/docfx.js"></script>
55
<script type="text/javascript" src="{{_rel}}styles/main.js"></script>
6-
<script type="text/javascript" src="https://cdn.rawgit.com/noelboss/featherlight/master/release/featherlight.min.js" charset="utf-8"></script>
7-
<script type="text/javascript" src="{{_rel}}styles/plugin-featherlight.js"></script>
86
<script type="text/javascript" src="{{_rel}}styles/styleswitcher.js"></script>
97
<script type="text/javascript" src="https://malsup.github.io/jquery.corner.js"></script>
108
<script type="text/javascript" src="{{_rel}}styles/cornerify.js"></script>

docs/_template/light-dark-theme/styles/master.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ body {
66
font-display: optional;
77
height: 100%;
88
font-size: 15px;
9-
scroll-behavior: smooth;
109
}
1110

1211
code{
@@ -92,6 +91,10 @@ article.content h6{
9291
line-height: 140%;
9392
}
9493

94+
.sideaffix > div.contribution {
95+
margin-bottom: 0;
96+
}
97+
9598
header .navbar {
9699
border-width: 0 0 0px;
97100
border-radius: 0;

docs/_template/light-dark-theme/styles/plugin-featherlight.js

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/docfx.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"**/images/**",
3636
"**/samples/**",
3737
"langwordMapping.yml",
38-
"marketing/logo/SVG/**.svg",
38+
"marketing/logo/**.svg",
39+
"marketing/logo/**.png",
3940
"favicon.ico"
4041
]
4142
}],
@@ -50,7 +51,7 @@
5051
"overwrite": "_overwrites/**/**.md",
5152
"globalMetadata": {
5253
"_appTitle": "Discord.Net Documentation",
53-
"_appFooter": "Discord.Net (c) 2015-2019 2.0.1",
54+
"_appFooter": "Discord.Net (c) 2015-2019 2.1.1",
5455
"_enableSearch": true,
5556
"_appLogoPath": "marketing/logo/SVG/Logomark Purple.svg",
5657
"_appFaviconPath": "favicon.ico"

docs/guides/getting_started/first-bot.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -146,23 +146,6 @@ method with the application's "token."
146146
> Pay attention to what you are copying from the developer portal!
147147
> A token is not the same as the application's "client secret."
148148
149-
> [!IMPORTANT]
150-
> Your bot's token can be used to gain total access to your bot, so
151-
> **do not** share this token with anyone else! You should store this
152-
> token in an external source if you plan on distributing
153-
> the source code for your bot.
154-
>
155-
> In the following example, we retrieve the token from the environment
156-
> variable `DiscordToken`. Please note that this is *not* designed to
157-
> be used in a production environment, as the secrets are stored in
158-
> plain-text.
159-
>
160-
> For information on how to set an environment variable, please see
161-
> instructions below,
162-
>
163-
> * Windows: [How to Create Environment Variables Shortcut in Windows](https://www.tenforums.com/tutorials/121742-create-environment-variables-shortcut-windows.html)
164-
> * Linux: [How To Read and Set Environmental and Shell Variables on a Linux VPS](https://www.digitalocean.com/community/tutorials/how-to-read-and-set-environmental-and-shell-variables-on-a-linux-vps)
165-
> * macOS: [How do I set environment variables on OS X?](https://apple.stackexchange.com/questions/106778/how-do-i-set-environment-variables-on-os-x)
166149

167150
We may now invoke the client's [StartAsync] method, which will
168151
start connection/reconnection logic. It is important to note that
@@ -175,6 +158,22 @@ Finally, we will want to block the async main method from returning
175158
when running the application. To do this, we can await an infinite delay
176159
or any other blocking method, such as reading from the console.
177160

161+
> [!IMPORTANT]
162+
> Your bot's token can be used to gain total access to your bot, so
163+
> **do not** share this token with anyone else! You should store this
164+
> token in an external source if you plan on distributing
165+
> the source code for your bot.
166+
>
167+
> In the following example, we retrieve the token from a pre-defined
168+
> variable, which is **NOT** secure, especially if you plan on
169+
> distributing the application in any shape or form.
170+
>
171+
> We recommend alternative storage such as
172+
> [Environment Variables], an external configuration file, or a
173+
> secrets manager for safe-handling of secrets.
174+
>
175+
> [Environment Variables]: https://en.wikipedia.org/wiki/Environment_variable
176+
178177
The following lines can now be added:
179178

180179
[!code-csharp[Create client](samples/first-bot/client.cs)]

docs/guides/getting_started/installing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ published to our [MyGet feed]. See
7878

7979
### [Using dotnet CLI](#tab/dotnet-cli)
8080

81-
1. Launch your terminal
81+
1. Launch a terminal of your choice
8282
2. Navigate to where your `*.csproj` is located
8383
3. Enter `dotnet add package Discord.Net`
8484

@@ -90,7 +90,7 @@ In order to compile Discord.Net, you will need the following:
9090

9191
### Using Visual Studio
9292

93-
* [Visual Studio 2017](https://www.visualstudio.com/)
93+
* [Visual Studio 2019](https://visualstudio.microsoft.com/)
9494
* [.NET Core SDK]
9595

9696
The .NET Core and Docker workload is required during Visual Studio
@@ -109,7 +109,7 @@ When running any Discord.Net-powered bot on an older operating system
109109
you may encounter a @System.PlatformNotSupportedException upon
110110
connecting.
111111

112-
You may resolve this by either targeting .NET Core 2.1 or later, or
112+
You may resolve this by either targeting .NET Core 2.1 or higher, or
113113
by installing one or more custom packages as listed below.
114114

115115
#### [Targeting .NET Core 2.1](#tab/core2-1)
@@ -141,4 +141,4 @@ over the default ones.
141141

142142
***
143143

144-
[.NET Core SDK]: https://www.microsoft.com/net/download/
144+
[.NET Core SDK]: https://dotnet.microsoft.com/download

docs/guides/getting_started/nightlies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ adding the feed to your package source.
5353
5454
### [Using dotnet CLI](#tab/cli)
5555

56-
1. Launch your terminal
56+
1. Launch a terminal of your choice
5757
2. Navigate to where your `*.csproj` is located
5858
3. Type `dotnet add package Discord.Net --source https://www.myget.org/F/discord-net/api/v3/index.json`
5959

0 commit comments

Comments
 (0)