From f84fc044ba3335d7defa9c5aa3681880d3e8b180 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Mon, 5 Jun 2023 21:46:51 +0100 Subject: [PATCH 1/4] chore: bump to 3.2.2 --- X10D.DSharpPlus/X10D.DSharpPlus.csproj | 2 +- X10D.Hosting/X10D.Hosting.csproj | 2 +- X10D.Unity/X10D.Unity.csproj | 2 +- X10D/X10D.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/X10D.DSharpPlus/X10D.DSharpPlus.csproj b/X10D.DSharpPlus/X10D.DSharpPlus.csproj index 0bef06b..9626435 100644 --- a/X10D.DSharpPlus/X10D.DSharpPlus.csproj +++ b/X10D.DSharpPlus/X10D.DSharpPlus.csproj @@ -16,7 +16,7 @@ dotnet extension-methods $([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/../CHANGELOG.md")) true - 3.2.0 + 3.2.2 enable true true diff --git a/X10D.Hosting/X10D.Hosting.csproj b/X10D.Hosting/X10D.Hosting.csproj index af34b97..3d986d6 100644 --- a/X10D.Hosting/X10D.Hosting.csproj +++ b/X10D.Hosting/X10D.Hosting.csproj @@ -16,7 +16,7 @@ dotnet extension-methods $([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/../CHANGELOG.md")) true - 3.2.0 + 3.2.2 enable true true diff --git a/X10D.Unity/X10D.Unity.csproj b/X10D.Unity/X10D.Unity.csproj index efb745c..b426b02 100644 --- a/X10D.Unity/X10D.Unity.csproj +++ b/X10D.Unity/X10D.Unity.csproj @@ -16,7 +16,7 @@ dotnet extension-methods $([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/../CHANGELOG.md")) true - 3.2.0 + 3.2.2 enable true true diff --git a/X10D/X10D.csproj b/X10D/X10D.csproj index 2afcbcb..1c5424b 100644 --- a/X10D/X10D.csproj +++ b/X10D/X10D.csproj @@ -17,7 +17,7 @@ README.md $([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/../CHANGELOG.md")) true - 3.2.0 + 3.2.2 enable true true From 103e037dc86d32811489bae4d34fa92ab666172c Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Mon, 5 Jun 2023 21:47:04 +0100 Subject: [PATCH 2/4] docs: update changelog --- CHANGELOG.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc5c548..4716a77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## 3.2.0 - [Unreleased] +## [3.2.2] - 2023-06-05 + +### Added + +- X10D.DSharpPlus: Added support for new usernames. See https://discord.com/blog/usernames + +## 3.2.1 - 2023-06-05 + +ERRONEOUS RELEASE. + +## [3.2.0] - 2023-04-03 ### Added @@ -567,7 +577,8 @@ please [open an issue](https://github.com/oliverbooth/X10D/issues)! Earlier versions of this package are undocumented and unlisted from package results. -[unreleased]: https://github.com/oliverbooth/X10D/compare/v3.1.0...develop +[unreleased]: https://github.com/oliverbooth/X10D/compare/v3.2.2...main +[3.2.0]: https://github.com/oliverbooth/X10D/releases/tag/v3.2.0 [3.1.0]: https://github.com/oliverbooth/X10D/releases/tag/v3.1.0 [3.0.0]: https://github.com/oliverbooth/X10D/releases/tag/v3.0.0 [2.6.0]: https://github.com/oliverbooth/X10D/releases/tag/2.6.0 From 678dd914d470d9453fe4c4e954e267e68b6bb0a4 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Mon, 5 Jun 2023 21:47:24 +0100 Subject: [PATCH 3/4] feat: add support for new usernames user discriminators become "0" if the user has a new username, distinct from "0000" for webhooks. --- X10D.DSharpPlus/src/DiscordUserExtensions.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/X10D.DSharpPlus/src/DiscordUserExtensions.cs b/X10D.DSharpPlus/src/DiscordUserExtensions.cs index 6ab8314..0cc9483 100644 --- a/X10D.DSharpPlus/src/DiscordUserExtensions.cs +++ b/X10D.DSharpPlus/src/DiscordUserExtensions.cs @@ -77,6 +77,12 @@ public static class DiscordUserExtensions } #endif + if (user.Discriminator == "0") + { + // user has a new username. see: https://discord.com/blog/usernames + return user.Username; + } + return $"{user.Username}#{user.Discriminator}"; } From 1a2f92c7002713e515aa2e40505f05f752505c67 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Mon, 5 Jun 2023 21:47:42 +0100 Subject: [PATCH 4/4] docs: update version in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 85d2dbb..36c6e54 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ X10D (pronounced *extend*), is a .NET package that provides extension methods fo ## Installation ### NuGet installation ```ps -Install-Package X10D -Version 3.2.0 +Install-Package X10D -Version 3.2.2 ``` ### Manual installation