Skip to content

Commit bf493ea

Browse files
authored
feat: Labs deprecation & readme expansion (#2406)
1 parent 519deda commit bf493ea

File tree

8 files changed

+78
-77
lines changed

8 files changed

+78
-77
lines changed

Diff for: CONTRIBUTING.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ following guidelines when possible:
77
## Development Cycle
88

99
We prefer all changes to the library to be discussed beforehand,
10-
either in a GitHub issue, or in a discussion in our Discord channel
11-
with library regulars or other contributors.
10+
either in a GitHub issue, or in a discussion in our [Discord server](https://discord.gg/dnet)
1211

1312
Issues that are tagged as "up for grabs" are free to be picked up by
1413
any member of the community.

Diff for: README.md

+53-30
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
</p>
2020
Discord.Net is an unofficial .NET API Wrapper for the Discord client (https://discord.com).
2121

22-
## Documentation
22+
## 📄 Documentation
2323

24-
- [Nightly](https://discordnet.dev)
24+
- https://discordnet.dev
2525

26-
## Installation
26+
## 📥 Installation
2727

2828
### Stable (NuGet)
2929

@@ -33,55 +33,78 @@ Our stable builds available from NuGet through the Discord.Net metapackage:
3333

3434
The individual components may also be installed from NuGet:
3535

36-
- [Discord.Net.Commands](https://www.nuget.org/packages/Discord.Net.Commands/)
37-
- [Discord.Net.Rest](https://www.nuget.org/packages/Discord.Net.Rest/)
38-
- [Discord.Net.WebSocket](https://www.nuget.org/packages/Discord.Net.WebSocket/)
39-
- [Discord.Net.Webhook](https://www.nuget.org/packages/Discord.Net.Webhook/)
36+
- _Webhooks_
37+
- [Discord.Net.Webhook](https://www.nuget.org/packages/Discord.Net.Webhook/)
4038

41-
### Unstable (MyGet)
39+
- _Text-Command & Interaction services._
40+
- [Discord.Net.Commands](https://www.nuget.org/packages/Discord.Net.Commands/)
41+
- [Discord.Net.Interactions](https://www.nuget.org/packages/Discord.Net.Interactions/)
4242

43-
Nightly builds are available through our MyGet feed (`https://www.myget.org/F/discord-net/api/v3/index.json`).
43+
- _Complete API coverage._
44+
- [Discord.Net.WebSocket](https://www.nuget.org/packages/Discord.Net.WebSocket/)
45+
- [Discord.Net.Rest](https://www.nuget.org/packages/Discord.Net.Rest/)
4446

45-
### Unstable (Labs)
47+
- _The API core. Implements only entities and barebones functionality._
48+
- [Discord.Net.Core](https://www.nuget.org/packages/Discord.Net.Core/)
4649

47-
Labs builds are available on nuget (`https://www.nuget.org/packages/Discord.Net.Labs/`) and myget (`https://www.myget.org/F/discord-net-labs/api/v3/index.json`).
50+
### Unstable
4851

49-
## Compiling
52+
Nightly builds are available through our MyGet feed (`https://www.myget.org/F/discord-net/api/v3/index.json`).
53+
These builds target the dev branch.
5054

51-
In order to compile Discord.Net, you require the following:
55+
## 🛑 Known Issues
5256

53-
### Using Visual Studio
57+
### WebSockets (Win7 and earlier)
5458

55-
- [Visual Studio 2017](https://www.microsoft.com/net/core#windowsvs2017)
56-
- [.NET Core SDK](https://www.microsoft.com/net/download/core)
59+
.NET Core 1.1 does not support WebSockets on Win7 and earlier.
60+
This issue has been fixed since the release of .NET Core 2.1.
61+
It is recommended to target .NET Core 2.1 or above for your project if you wish to run your bot on legacy platforms;
62+
alternatively, you may choose to install the
63+
[Discord.Net.Providers.WS4Net](https://www.nuget.org/packages/Discord.Net.Providers.WS4Net/) package.
5764

58-
The .NET Core workload must be selected during Visual Studio installation.
65+
### TLS on .NET Framework.
5966

60-
### Using Command Line
67+
Discord supports only TLS1.2+ on all their websites including the API since 07/19/2022.
68+
.NET Framework does not support this protocol by default.
69+
If you depend on .NET Framework, it is suggested to upgrade your project to `net6-windows`.
70+
This framework supports most of the windows-only features introduced by fx, and resolves startup errors from the TLS protocol mismatch.
6171

62-
- [.NET Core SDK](https://www.microsoft.com/net/download/core)
72+
## 🗃️ Versioning Guarantees
6373

64-
## Known Issues
74+
This library generally abides by [Semantic Versioning](https://semver.org). Packages are published in `MAJOR.MINOR.PATCH` version format.
6575

66-
### WebSockets (Win7 and earlier)
76+
### Patch component
6777

68-
.NET Core 1.1 does not support WebSockets on Win7 and earlier. This issue has been fixed since the release of .NET Core 2.1. It is recommended to target .NET Core 2.1 or above for your project if you wish to run your bot on legacy platforms; alternatively, you may choose to install the [Discord.Net.Providers.WS4Net](https://www.nuget.org/packages/Discord.Net.Providers.WS4Net/) package.
78+
An increment of the **PATCH** component always indicates that an internal-only change was made, generally a bugfix. These changes will not affect the public-facing API in any way, and are always guaranteed to be forward- and backwards-compatible with your codebase, any pre-compiled dependencies of your codebase.
6979

70-
## Versioning Guarantees
80+
### Minor component
7181

72-
This library generally abides by [Semantic Versioning](https://semver.org). Packages are published in MAJOR.MINOR.PATCH version format.
82+
An increment of the **MINOR** component indicates that some addition was made to the library,
83+
and this addition is not backwards-compatible with prior versions.
84+
However, Discord.Net **does not guarantee forward-compatibility** on minor additions.
85+
In other words, we permit a limited set of breaking changes on a minor version bump.
7386

74-
An increment of the PATCH component always indicates that an internal-only change was made, generally a bugfix. These changes will not affect the public-facing API in any way, and are always guaranteed to be forward- and backwards-compatible with your codebase, any pre-compiled dependencies of your codebase.
87+
Due to the nature of the Discord API, we will oftentimes need to add a property to an entity to support the latest API changes.
88+
Discord.Net provides interfaces as a method of consuming entities; and as such, introducing a new field to an entity is technically a breaking change.
89+
Major version bumps generally indicate some major change to the library,
90+
and as such we are hesitant to bump the major version for every minor addition to the library.
91+
To compromise, we have decided that interfaces should be treated as **consumable only**,
92+
and your applications should typically not be implementing interfaces.
7593

76-
An increment of the MINOR component indicates that some addition was made to the library, and this addition is not backwards-compatible with prior versions. However, Discord.Net **does not guarantee forward-compatibility** on minor additions. In other words, we permit a limited set of breaking changes on a minor version bump.
94+
> For applications where interfaces are implemented, such as in test mocks, we apologize for this inconsistency with SemVer.
7795
78-
Due to the nature of the Discord API, we will oftentimes need to add a property to an entity to support the latest API changes. Discord.Net provides interfaces as a method of consuming entities; and as such, introducing a new field to an entity is technically a breaking change. Major version bumps generally indicate some major change to the library, and as such we are hesitant to bump the major version for every minor addition to the library. To compromise, we have decided that interfaces should be treated as **consumable only**, and your applications should typically not be implementing interfaces. (For applications where interfaces are implemented, such as in test mocks, we apologize for this inconsistency with SemVer).
96+
While we will never break the API (outside of interface changes) on minor builds,
97+
we will occasionally need to break the ABI, by introducing parameters to a method to match changes upstream with Discord.
98+
As such, a minor version increment may require you to recompile your code, and dependencies,
99+
such as addons, may also need to be recompiled and republished on the newer version.
100+
When a binary breaking change is made, the change will be noted in the release notes.
79101

80-
Furthermore, while we will never break the API (outside of interface changes) on minor builds, we will occasionally need to break the ABI, by introducing parameters to a method to match changes upstream with Discord. As such, a minor version increment may require you to recompile your code, and dependencies, such as addons, may also need to be recompiled and republished on the newer version. When a binary breaking change is made, the change will be noted in the release notes.
102+
### Major component
81103

82-
An increment of the MAJOR component indicates that breaking changes have been made to the library; consumers should check the release notes to determine what changes need to be made.
104+
An increment of the **MAJOR** component indicates that breaking changes have been made to the library;
105+
consumers should check the release notes to determine what changes need to be made.
83106

84-
## Branches
107+
## 📚 Branches
85108

86109
### Release/X.X
87110

Diff for: docs/faq/basics/client-basics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ _client = new DiscordSocketClient(config);
3636
This includes intents that receive messages such as: `GatewayIntents.GuildMessages, GatewayIntents.DirectMessages`
3737
- GuildMembers: An intent disabled by default, as you need to enable it in the [developer portal].
3838
- GuildPresences: Also disabled by default, this intent together with `GuildMembers` are the only intents not included in `AllUnprivileged`.
39-
- All: All intents, it is ill adviced to use this without care, as it *can* cause a memory leak from presence.
39+
- All: All intents, it is ill advised to use this without care, as it _can_ cause a memory leak from presence.
4040
The library will give responsive warnings if you specify unnecessary intents.
4141

4242

Diff for: docs/guides/getting_started/installing.md

+14-6
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,25 @@ other limitations, you may also consider targeting [.NET Framework]
3030
[.net framework]: https://docs.microsoft.com/en-us/dotnet/framework/get-started/
3131
[additional steps]: #installing-on-net-standard-11
3232

33-
## Installing with NuGet
33+
## Installing
3434

3535
Release builds of Discord.Net will be published to the
3636
[official NuGet feed].
3737

38-
Development builds of Discord.Net, as well as add-ons, will be
39-
published to our [MyGet feed]. See
40-
@Guides.GettingStarted.Installation.Nightlies to learn more.
38+
### Experimental/Development
4139

42-
[official nuget feed]: https://nuget.org
43-
[myget feed]: https://www.myget.org/feed/Packages/discord-net
40+
Development builds of Discord.Net will be
41+
published to our [MyGet feed]. The MyGet feed can be used to run the latest dev branch builds.
42+
It is not advised to use MyGet packages in a production environment, as changes may be made that negatively affect certain library functions.
43+
44+
### Labs
45+
46+
This exterior branch of Discord.Net has been deprecated and is no longer supported.
47+
If you have used Discord.Net-Labs in the past, you are advised to update to the latest version of Discord.Net.
48+
All features in Labs are implemented in the main repository.
49+
50+
[official NuGet feed]: https://nuget.org
51+
[MyGet feed]: https://www.myget.org/feed/Packages/discord-net
4452

4553
### [Using Visual Studio](#tab/vs-install)
4654

Diff for: docs/guides/getting_started/labs.md

-30
This file was deleted.

Diff for: docs/guides/getting_started/terminology.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,22 @@ title: Terminology
88
## Preface
99

1010
Most terms for objects remain the same between 0.9 and 1.0 and above.
11-
The major difference is that the ``Server`` is now called ``Guild``
11+
The major difference is that the `Server` is now called `Guild`
1212
to stay in line with Discord internally.
1313

1414
## Implementation Specific Entities
1515

1616
Discord.Net is split into a core library and two different
1717
implementations - `Discord.Net.Core`, `Discord.Net.Rest`, and
18-
`Discord.Net.WebSockets`.
18+
`Discord.Net.WebSocket`.
1919

20-
As a bot developer, you will only need to use `Discord.Net.WebSockets`,
20+
You will typically only need to use `Discord.Net.WebSocket`,
2121
but you should be aware of the differences between them.
2222

23+
> [!TIP]
24+
> If you are looking to implement Rest based interactions, or handle calls over REST in any other way,
25+
> `Discord.Net.Rest` is the resource most applicable to you.
26+
2327
`Discord.Net.Core` provides a set of interfaces that models Discord's
2428
API. These interfaces are consistent throughout all implementations of
2529
Discord.Net, and if you are writing an implementation-agnostic library
@@ -33,4 +37,4 @@ implementation are prefixed with `Rest` (e.g., `RestChannel`).
3337
`Discord.Net.WebSocket` provides a set of concrete classes that are
3438
used primarily with Discord's WebSocket API or entities that are kept
3539
in cache. When developing bots, you will be using this implementation.
36-
All entities are prefixed with `Socket` (e.g., `SocketChannel`).
40+
All entities are prefixed with `Socket` (e.g., `SocketChannel`).

Diff for: docs/guides/toc.yml

-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
items:
77
- name: Installation
88
topicUid: Guides.GettingStarted.Installation
9-
items:
10-
- name: Nightly builds
11-
topicUid: Guides.GettingStarted.Installation.Labs
129
- name: Your First Bot
1310
topicUid: Guides.GettingStarted.FirstBot
1411
- name: Terminology

Diff for: docs/guides/v2_v3_guide/v2_to_v3_guide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ _client = new DiscordSocketClient(config);
3838
This includes intents that receive messages such as: `GatewayIntents.GuildMessages, GatewayIntents.DirectMessages`
3939
- GuildMembers: An intent disabled by default, as you need to enable it in the [developer portal].
4040
- GuildPresences: Also disabled by default, this intent together with `GuildMembers` are the only intents not included in `AllUnprivileged`.
41-
- All: All intents, it is ill adviced to use this without care, as it _can_ cause a memory leak from presence.
41+
- All: All intents, it is ill advised to use this without care, as it _can_ cause a memory leak from presence.
4242
The library will give responsive warnings if you specify unnecessary intents.
4343

4444
> [!NOTE]

0 commit comments

Comments
 (0)