Browse Source

feat: Labs deprecation & readme expansion (#2406)

tags/3.8.0
Armano den Boef GitHub 2 years ago
parent
commit
bf493ea040
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 78 additions and 77 deletions
  1. +1
    -2
      CONTRIBUTING.md
  2. +53
    -30
      README.md
  3. +1
    -1
      docs/faq/basics/client-basics.md
  4. +14
    -6
      docs/guides/getting_started/installing.md
  5. +0
    -30
      docs/guides/getting_started/labs.md
  6. +8
    -4
      docs/guides/getting_started/terminology.md
  7. +0
    -3
      docs/guides/toc.yml
  8. +1
    -1
      docs/guides/v2_v3_guide/v2_to_v3_guide.md

+ 1
- 2
CONTRIBUTING.md View File

@@ -7,8 +7,7 @@ following guidelines when possible:
## Development Cycle

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

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


+ 53
- 30
README.md View File

@@ -19,11 +19,11 @@
</p>
Discord.Net is an unofficial .NET API Wrapper for the Discord client (https://discord.com).

## Documentation
## 📄 Documentation

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

## Installation
## 📥 Installation

### Stable (NuGet)

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

The individual components may also be installed from NuGet:

- [Discord.Net.Commands](https://www.nuget.org/packages/Discord.Net.Commands/)
- [Discord.Net.Rest](https://www.nuget.org/packages/Discord.Net.Rest/)
- [Discord.Net.WebSocket](https://www.nuget.org/packages/Discord.Net.WebSocket/)
- [Discord.Net.Webhook](https://www.nuget.org/packages/Discord.Net.Webhook/)
- _Webhooks_
- [Discord.Net.Webhook](https://www.nuget.org/packages/Discord.Net.Webhook/)

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

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

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

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`).
### Unstable

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

In order to compile Discord.Net, you require the following:
## 🛑 Known Issues

### Using Visual Studio
### WebSockets (Win7 and earlier)

- [Visual Studio 2017](https://www.microsoft.com/net/core#windowsvs2017)
- [.NET Core SDK](https://www.microsoft.com/net/download/core)
.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.

The .NET Core workload must be selected during Visual Studio installation.
### TLS on .NET Framework.

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

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

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

### WebSockets (Win7 and earlier)
### Patch component

.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.
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.

## Versioning Guarantees
### Minor component

This library generally abides by [Semantic Versioning](https://semver.org). Packages are published in MAJOR.MINOR.PATCH version format.
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.

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.
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.

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.
> For applications where interfaces are implemented, such as in test mocks, we apologize for this inconsistency with SemVer.

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).
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.

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.
### Major component

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.
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.

## Branches
## 📚 Branches

### Release/X.X



+ 1
- 1
docs/faq/basics/client-basics.md View File

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




+ 14
- 6
docs/guides/getting_started/installing.md View File

@@ -30,17 +30,25 @@ other limitations, you may also consider targeting [.NET Framework]
[.net framework]: https://docs.microsoft.com/en-us/dotnet/framework/get-started/
[additional steps]: #installing-on-net-standard-11

## Installing with NuGet
## Installing

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

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

[official nuget feed]: https://nuget.org
[myget feed]: https://www.myget.org/feed/Packages/discord-net
Development builds of Discord.Net will be
published to our [MyGet feed]. The MyGet feed can be used to run the latest dev branch builds.
It is not advised to use MyGet packages in a production environment, as changes may be made that negatively affect certain library functions.

### Labs

This exterior branch of Discord.Net has been deprecated and is no longer supported.
If you have used Discord.Net-Labs in the past, you are advised to update to the latest version of Discord.Net.
All features in Labs are implemented in the main repository.

[official NuGet feed]: https://nuget.org
[MyGet feed]: https://www.myget.org/feed/Packages/discord-net

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



+ 0
- 30
docs/guides/getting_started/labs.md View File

@@ -1,30 +0,0 @@
---
uid: Guides.GettingStarted.Installation.Labs
title: Installing Labs builds
---

# Installing Discord.NET Labs

Discord.NET Labs is the experimental repository that introduces new features & chips away at all bugs until ready for merging into Discord.NET.
Are you looking to test or play with new features?

> [!IMPORTANT]
> It is very ill advised to use Discord.NET Labs in a production environment normally,
> considering it can include bugs that have not been discovered yet, as features are freshly added.
> However if approached correctly, will work as a pre-release to Discord.NET.
> Make sure to report any bugs at the Labs [repository] or on [Discord]

[Discord]: https://discord.gg/dnet
[repository]: https://github.com/Discord-Net-Labs/Discord.Net-Labs

## Installation:

[NuGet] - This only includes releases, on which features are ready to test.

> [!NOTE]
> Installing NuGet packages is covered fully at [Installing Discord NET](xref:Guides.GettingStarted.Installation)

[MyGet] - Available for current builds and unreleased features.

[NuGet]: https://www.nuget.org/packages/Discord.Net.Labs/
[MyGet]: https://www.myget.org/feed/Packages/discord-net-labs

+ 8
- 4
docs/guides/getting_started/terminology.md View File

@@ -8,18 +8,22 @@ title: Terminology
## Preface

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

## Implementation Specific Entities

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

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

> [!TIP]
> If you are looking to implement Rest based interactions, or handle calls over REST in any other way,
> `Discord.Net.Rest` is the resource most applicable to you.

`Discord.Net.Core` provides a set of interfaces that models Discord's
API. These interfaces are consistent throughout all implementations of
Discord.Net, and if you are writing an implementation-agnostic library
@@ -33,4 +37,4 @@ implementation are prefixed with `Rest` (e.g., `RestChannel`).
`Discord.Net.WebSocket` provides a set of concrete classes that are
used primarily with Discord's WebSocket API or entities that are kept
in cache. When developing bots, you will be using this implementation.
All entities are prefixed with `Socket` (e.g., `SocketChannel`).
All entities are prefixed with `Socket` (e.g., `SocketChannel`).

+ 0
- 3
docs/guides/toc.yml View File

@@ -6,9 +6,6 @@
items:
- name: Installation
topicUid: Guides.GettingStarted.Installation
items:
- name: Nightly builds
topicUid: Guides.GettingStarted.Installation.Labs
- name: Your First Bot
topicUid: Guides.GettingStarted.FirstBot
- name: Terminology


+ 1
- 1
docs/guides/v2_v3_guide/v2_to_v3_guide.md View File

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

> [!NOTE]


Loading…
Cancel
Save