From afcd179d693035a8224f7026126414c34c85c7d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Hjorth=C3=B8j?= Date: Sat, 25 Sep 2021 22:47:14 +0200 Subject: [PATCH 01/10] Consistency for embeds endpoints (#197) * Changed the way of handling prepending of embeds. For consistency. * reformatted the summary --- .../SocketMessageComponent.cs | 56 +++++-------------- .../SocketBaseCommand/SocketCommandBase.cs | 44 +++------------ 2 files changed, 22 insertions(+), 78 deletions(-) diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/Message Components/SocketMessageComponent.cs b/src/Discord.Net.WebSocket/Entities/Interaction/Message Components/SocketMessageComponent.cs index aa3a915ae..849ce4df8 100644 --- a/src/Discord.Net.WebSocket/Entities/Interaction/Message Components/SocketMessageComponent.cs +++ b/src/Discord.Net.WebSocket/Entities/Interaction/Message Components/SocketMessageComponent.cs @@ -10,9 +10,9 @@ using System.IO; namespace Discord.WebSocket { -/// -/// Represents a Websocket-based interaction type for Message Components. -/// + /// + /// Represents a Websocket-based interaction type for Message Components. + /// public class SocketMessageComponent : SocketInteraction { /// @@ -84,16 +84,9 @@ namespace Discord.WebSocket if (!IsValidToken) throw new InvalidOperationException("Interaction token is no longer valid"); + embeds ??= Array.Empty(); if (embed != null) - { - if (embeds == null) - embeds = new[] { embed }; - else - { - List listEmbeds = embeds.ToList(); - listEmbeds.Insert(0, embed); - } - } + embeds = new[] { embed }.Concat(embeds).ToArray(); Preconditions.AtMost(allowedMentions?.RoleIds?.Count ?? 0, 100, nameof(allowedMentions.RoleIds), "A max of 100 role Ids are allowed."); Preconditions.AtMost(allowedMentions?.UserIds?.Count ?? 0, 100, nameof(allowedMentions.UserIds), "A max of 100 user Ids are allowed."); @@ -150,9 +143,9 @@ namespace Discord.WebSocket if (args.AllowedMentions.IsSpecified) { - var allowedMentions = args.AllowedMentions.Value; - Preconditions.AtMost(allowedMentions?.RoleIds?.Count ?? 0, 100, nameof(allowedMentions), "A max of 100 role Ids are allowed."); - Preconditions.AtMost(allowedMentions?.UserIds?.Count ?? 0, 100, nameof(allowedMentions), "A max of 100 user Ids are allowed."); + var allowedMentions = args.AllowedMentions.Value; + Preconditions.AtMost(allowedMentions?.RoleIds?.Count ?? 0, 100, nameof(allowedMentions), "A max of 100 role Ids are allowed."); + Preconditions.AtMost(allowedMentions?.UserIds?.Count ?? 0, 100, nameof(allowedMentions), "A max of 100 user Ids are allowed."); } var embed = args.Embed; @@ -227,16 +220,9 @@ namespace Discord.WebSocket if (!IsValidToken) throw new InvalidOperationException("Interaction token is no longer valid"); + embeds ??= Array.Empty(); if (embed != null) - { - if (embeds == null) - embeds = new[] { embed }; - else - { - List listEmbeds = embeds.ToList(); - listEmbeds.Insert(0, embed); - } - } + embeds = new[] { embed }.Concat(embeds).ToArray(); Preconditions.AtMost(allowedMentions?.RoleIds?.Count ?? 0, 100, nameof(allowedMentions.RoleIds), "A max of 100 role Ids are allowed."); Preconditions.AtMost(allowedMentions?.UserIds?.Count ?? 0, 100, nameof(allowedMentions.UserIds), "A max of 100 user Ids are allowed."); @@ -273,16 +259,9 @@ namespace Discord.WebSocket if (!IsValidToken) throw new InvalidOperationException("Interaction token is no longer valid"); + embeds ??= Array.Empty(); if (embed != null) - { - if (embeds == null) - embeds = new[] { embed }; - else - { - List listEmbeds = embeds.ToList(); - listEmbeds.Insert(0, embed); - } - } + embeds = new[] { embed }.Concat(embeds).ToArray(); Preconditions.AtMost(allowedMentions?.RoleIds?.Count ?? 0, 100, nameof(allowedMentions.RoleIds), "A max of 100 role Ids are allowed."); Preconditions.AtMost(allowedMentions?.UserIds?.Count ?? 0, 100, nameof(allowedMentions.UserIds), "A max of 100 user Ids are allowed."); @@ -322,16 +301,9 @@ namespace Discord.WebSocket if (!IsValidToken) throw new InvalidOperationException("Interaction token is no longer valid"); + embeds ??= Array.Empty(); if (embed != null) - { - if (embeds == null) - embeds = new[] { embed }; - else - { - List listEmbeds = embeds.ToList(); - listEmbeds.Insert(0, embed); - } - } + embeds = new[] { embed }.Concat(embeds).ToArray(); Preconditions.AtMost(allowedMentions?.RoleIds?.Count ?? 0, 100, nameof(allowedMentions.RoleIds), "A max of 100 role Ids are allowed."); Preconditions.AtMost(allowedMentions?.UserIds?.Count ?? 0, 100, nameof(allowedMentions.UserIds), "A max of 100 user Ids are allowed."); diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketCommandBase.cs b/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketCommandBase.cs index d0622196a..c2a7d5409 100644 --- a/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketCommandBase.cs +++ b/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketCommandBase.cs @@ -79,16 +79,9 @@ namespace Discord.WebSocket if (!IsValidToken) throw new InvalidOperationException("Interaction token is no longer valid"); + embeds ??= Array.Empty(); if (embed != null) - { - if (embeds == null) - embeds = new[] { embed }; - else - { - List listEmbeds = embeds.ToList(); - listEmbeds.Insert(0, embed); - } - } + embeds = new[] { embed }.Concat(embeds).ToArray(); Preconditions.AtMost(allowedMentions?.RoleIds?.Count ?? 0, 100, nameof(allowedMentions.RoleIds), "A max of 100 role Ids are allowed."); Preconditions.AtMost(allowedMentions?.UserIds?.Count ?? 0, 100, nameof(allowedMentions.UserIds), "A max of 100 user Ids are allowed."); @@ -141,16 +134,9 @@ namespace Discord.WebSocket if (!IsValidToken) throw new InvalidOperationException("Interaction token is no longer valid"); + embeds ??= Array.Empty(); if (embed != null) - { - if (embeds == null) - embeds = new[] { embed }; - else - { - List listEmbeds = embeds.ToList(); - listEmbeds.Insert(0, embed); - } - } + embeds = new[] { embed }.Concat(embeds).ToArray(); Preconditions.AtMost(allowedMentions?.RoleIds?.Count ?? 0, 100, nameof(allowedMentions.RoleIds), "A max of 100 role Ids are allowed."); Preconditions.AtMost(allowedMentions?.UserIds?.Count ?? 0, 100, nameof(allowedMentions.UserIds), "A max of 100 user Ids are allowed."); @@ -187,16 +173,9 @@ namespace Discord.WebSocket if (!IsValidToken) throw new InvalidOperationException("Interaction token is no longer valid"); + embeds ??= Array.Empty(); if (embed != null) - { - if (embeds == null) - embeds = new[] { embed }; - else - { - List listEmbeds = embeds.ToList(); - listEmbeds.Insert(0, embed); - } - } + embeds = new[] { embed }.Concat(embeds).ToArray(); Preconditions.AtMost(allowedMentions?.RoleIds?.Count ?? 0, 100, nameof(allowedMentions.RoleIds), "A max of 100 role Ids are allowed."); Preconditions.AtMost(allowedMentions?.UserIds?.Count ?? 0, 100, nameof(allowedMentions.UserIds), "A max of 100 user Ids are allowed."); @@ -236,16 +215,9 @@ namespace Discord.WebSocket if (!IsValidToken) throw new InvalidOperationException("Interaction token is no longer valid"); + embeds ??= Array.Empty(); if (embed != null) - { - if (embeds == null) - embeds = new[] { embed }; - else - { - List listEmbeds = embeds.ToList(); - listEmbeds.Insert(0, embed); - } - } + embeds = new[] { embed }.Concat(embeds).ToArray(); Preconditions.AtMost(allowedMentions?.RoleIds?.Count ?? 0, 100, nameof(allowedMentions.RoleIds), "A max of 100 role Ids are allowed."); Preconditions.AtMost(allowedMentions?.UserIds?.Count ?? 0, 100, nameof(allowedMentions.UserIds), "A max of 100 user Ids are allowed."); From 7cabcc787acf8a579ede86ef80f349d5dd01e228 Mon Sep 17 00:00:00 2001 From: Will Date: Sun, 26 Sep 2021 05:38:49 -0400 Subject: [PATCH 02/10] Changed minimum slash command name length to 1 per Discord API docs (#198) --- src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs b/src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs index 8f9163692..5dbf78f58 100644 --- a/src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs +++ b/src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs @@ -195,7 +195,7 @@ namespace Discord.Rest if (args.Name.IsSpecified) { Preconditions.AtMost(args.Name.Value.Length, 32, nameof(args.Name)); - Preconditions.AtLeast(args.Name.Value.Length, 3, nameof(args.Name)); + Preconditions.AtLeast(args.Name.Value.Length, 1, nameof(args.Name)); } var model = new Discord.API.Rest.ModifyApplicationCommandParams() From d21d83b772297e95dc9ea81373fd3f5851b0c45f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Hjorth=C3=B8j?= Date: Sun, 26 Sep 2021 16:51:34 +0200 Subject: [PATCH 03/10] Channel endpoints requirements correction (#199) * Added some requirements to channels for topic * Changed check from NotNullOrEmpty to NotNullOrEmpty * Added some requirements to channels for name Preconditions.LessThan * Formatting of file --- src/Discord.Net.Rest/DiscordRestApiClient.cs | 37 +++++++++++++------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/src/Discord.Net.Rest/DiscordRestApiClient.cs b/src/Discord.Net.Rest/DiscordRestApiClient.cs index 461981e28..19fc82fce 100644 --- a/src/Discord.Net.Rest/DiscordRestApiClient.cs +++ b/src/Discord.Net.Rest/DiscordRestApiClient.cs @@ -320,6 +320,7 @@ namespace Discord.API var model = await SendAsync("GET", () => $"channels/{channelId}", ids, options: options).ConfigureAwait(false); if (!model.GuildId.IsSpecified || model.GuildId.Value != guildId) return null; + return model; } catch (HttpException ex) when (ex.HttpCode == HttpStatusCode.NotFound) { return null; } @@ -338,11 +339,16 @@ namespace Discord.API Preconditions.NotNull(args, nameof(args)); Preconditions.GreaterThan(args.Bitrate, 0, nameof(args.Bitrate)); Preconditions.NotNullOrWhitespace(args.Name, nameof(args.Name)); + Preconditions.LessThan(args.Name.Length, 100, nameof(args.Name)); + if (args.Topic.IsSpecified) + Preconditions.LessThan(args.Topic.Value.Length, 1024, nameof(args.Name)); + options = RequestOptions.CreateOrClone(options); var ids = new BucketIds(guildId: guildId); return await SendJsonAsync("POST", () => $"guilds/{guildId}/channels", args, ids, options: options).ConfigureAwait(false); } + public async Task DeleteChannelAsync(ulong channelId, RequestOptions options = null) { Preconditions.NotEqual(channelId, 0, nameof(channelId)); @@ -366,18 +372,23 @@ namespace Discord.API Preconditions.NotEqual(channelId, 0, nameof(channelId)); Preconditions.NotNull(args, nameof(args)); Preconditions.AtLeast(args.Position, 0, nameof(args.Position)); - Preconditions.NotNullOrEmpty(args.Name, nameof(args.Name)); + Preconditions.NotNullOrWhitespace(args.Name, nameof(args.Name)); + Preconditions.LessThan(args.Name.Value.Length, 100, nameof(args.Name)); + options = RequestOptions.CreateOrClone(options); var ids = new BucketIds(channelId: channelId); return await SendJsonAsync("PATCH", () => $"channels/{channelId}", args, ids, options: options).ConfigureAwait(false); } + public async Task ModifyGuildChannelAsync(ulong channelId, Rest.ModifyTextChannelParams args, RequestOptions options = null) { Preconditions.NotEqual(channelId, 0, nameof(channelId)); Preconditions.NotNull(args, nameof(args)); Preconditions.AtLeast(args.Position, 0, nameof(args.Position)); - Preconditions.NotNullOrEmpty(args.Name, nameof(args.Name)); + Preconditions.NotNullOrWhitespace(args.Name, nameof(args.Name)); + Preconditions.LessThan(args.Name.Value.Length, 100, nameof(args.Name)); + Preconditions.LessThan(args.Topic.Value.Length, 1024, nameof(args.Name)); Preconditions.AtLeast(args.SlowModeInterval, 0, nameof(args.SlowModeInterval)); Preconditions.AtMost(args.SlowModeInterval, 21600, nameof(args.SlowModeInterval)); options = RequestOptions.CreateOrClone(options); @@ -385,6 +396,7 @@ namespace Discord.API var ids = new BucketIds(channelId: channelId); return await SendJsonAsync("PATCH", () => $"channels/{channelId}", args, ids, options: options).ConfigureAwait(false); } + public async Task ModifyGuildChannelAsync(ulong channelId, Rest.ModifyVoiceChannelParams args, RequestOptions options = null) { Preconditions.NotEqual(channelId, 0, nameof(channelId)); @@ -392,12 +404,13 @@ namespace Discord.API Preconditions.AtLeast(args.Bitrate, 8000, nameof(args.Bitrate)); Preconditions.AtLeast(args.UserLimit, 0, nameof(args.UserLimit)); Preconditions.AtLeast(args.Position, 0, nameof(args.Position)); - Preconditions.NotNullOrEmpty(args.Name, nameof(args.Name)); + Preconditions.NotNullOrWhitespace(args.Name, nameof(args.Name)); options = RequestOptions.CreateOrClone(options); var ids = new BucketIds(channelId: channelId); return await SendJsonAsync("PATCH", () => $"channels/{channelId}", args, ids, options: options).ConfigureAwait(false); } + public async Task ModifyGuildChannelsAsync(ulong guildId, IEnumerable args, RequestOptions options = null) { Preconditions.NotEqual(guildId, 0, nameof(guildId)); @@ -441,7 +454,7 @@ namespace Discord.API return await SendJsonAsync("POST", () => $"channels/{channelId}/messages/{messageId}/threads", args, bucket, options: options).ConfigureAwait(false); } - + public async Task StartThreadAsync(ulong channelId, StartThreadParams args, RequestOptions options = null) { Preconditions.NotEqual(channelId, 0, nameof(channelId)); @@ -592,7 +605,7 @@ namespace Discord.API #region Stage public async Task CreateStageInstanceAsync(CreateStageInstanceParams args, RequestOptions options = null) { - + options = RequestOptions.CreateOrClone(options); var bucket = new BucketIds(); @@ -636,7 +649,7 @@ namespace Discord.API { return await SendAsync("POST", () => $"stage-instances/{channelId}", bucket, options: options).ConfigureAwait(false); } - catch(HttpException httpEx) when (httpEx.HttpCode == HttpStatusCode.NotFound) + catch (HttpException httpEx) when (httpEx.HttpCode == HttpStatusCode.NotFound) { return null; } @@ -1137,7 +1150,7 @@ namespace Discord.API { return await SendAsync("GET", () => $"applications/{CurrentUserId}/commands/{id}", new BucketIds(), options: options).ConfigureAwait(false); } - catch(HttpException x) when (x.HttpCode == HttpStatusCode.NotFound) { return null; } + catch (HttpException x) when (x.HttpCode == HttpStatusCode.NotFound) { return null; } } public async Task CreateGlobalApplicationCommandAsync(CreateApplicationCommandParams command, RequestOptions options = null) @@ -1208,7 +1221,7 @@ namespace Discord.API { return await SendAsync("GET", () => $"applications/{CurrentUserId}/guilds/{guildId}/commands/{commandId}", bucket, options: options); } - catch(HttpException x) when (x.HttpCode == HttpStatusCode.NotFound) { return null; } + catch (HttpException x) when (x.HttpCode == HttpStatusCode.NotFound) { return null; } } public async Task CreateGuildApplicationCommandAsync(CreateApplicationCommandParams command, ulong guildId, RequestOptions options = null) @@ -1236,7 +1249,7 @@ namespace Discord.API var bucket = new BucketIds(guildId: guildId); - return await TrySendApplicationCommandAsync(SendJsonAsync("PATCH", () => $"applications/{CurrentUserId}/guilds/{guildId}/commands/{commandId}", command, bucket, options: options)).ConfigureAwait(false); + return await TrySendApplicationCommandAsync(SendJsonAsync("PATCH", () => $"applications/{CurrentUserId}/guilds/{guildId}/commands/{commandId}", command, bucket, options: options)).ConfigureAwait(false); } public async Task DeleteGuildApplicationCommandAsync(ulong guildId, ulong commandId, RequestOptions options = null) { @@ -1260,7 +1273,7 @@ namespace Discord.API #region Interaction Responses public async Task CreateInteractionResponseAsync(InteractionResponse response, ulong interactionId, string interactionToken, RequestOptions options = null) { - if(response.Data.IsSpecified && response.Data.Value.Content.IsSpecified) + if (response.Data.IsSpecified && response.Data.Value.Content.IsSpecified) Preconditions.AtMost(response.Data.Value.Content.Value?.Length ?? 0, 2000, nameof(response.Data.Value.Content)); options = RequestOptions.CreateOrClone(options); @@ -1309,7 +1322,7 @@ namespace Discord.API Preconditions.NotNull(args, nameof(args)); Preconditions.NotEqual(id, 0, nameof(id)); - if(args.Content.IsSpecified) + if (args.Content.IsSpecified) if (args.Content.Value.Length > DiscordConfig.MaxMessageSize) throw new ArgumentException(message: $"Message content is too long, length must be less or equal to {DiscordConfig.MaxMessageSize}.", paramName: nameof(args.Content)); @@ -2102,7 +2115,7 @@ namespace Discord.API else return result; } - catch(HttpException x) + catch (HttpException x) { if (x.HttpCode == HttpStatusCode.BadRequest) { From 94ff2e69edc8b3ac311be9fc02ccf17470f2db9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Hjorth=C3=B8j?= Date: Sun, 26 Sep 2021 17:16:43 +0200 Subject: [PATCH 04/10] Added restriction for description not being null (#200) --- .../Interactions/Slash Commands/SlashCommandBuilder.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Discord.Net.Core/Entities/Interactions/Slash Commands/SlashCommandBuilder.cs b/src/Discord.Net.Core/Entities/Interactions/Slash Commands/SlashCommandBuilder.cs index 4abf84eb3..16855b818 100644 --- a/src/Discord.Net.Core/Entities/Interactions/Slash Commands/SlashCommandBuilder.cs +++ b/src/Discord.Net.Core/Entities/Interactions/Slash Commands/SlashCommandBuilder.cs @@ -50,7 +50,8 @@ namespace Discord } /// - /// A 1-100 length description of this slash command + /// A 1-100 length description of this slash command. + /// The description is not allowed to be null. /// public string Description { @@ -60,6 +61,7 @@ namespace Discord } set { + Preconditions.NotNullOrEmpty(value, nameof(Description)); Preconditions.AtLeast(value.Length, 1, nameof(Description)); Preconditions.AtMost(value.Length, MaxDescriptionLength, nameof(Description)); From a4550c82c7722899d43d769a6215b334e0570b24 Mon Sep 17 00:00:00 2001 From: Quin Lynch <49576606+quinchs@users.noreply.github.com> Date: Sun, 26 Sep 2021 14:17:41 -0300 Subject: [PATCH 05/10] Update azure-pipelines.yml --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e8d30a365..177f91d33 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,6 +2,7 @@ variables: buildConfiguration: Release buildTag: $[ startsWith(variables['Build.SourceBranch'], 'refs/tags') ] buildNumber: $[ variables['Build.BuildNumber'] ] + suffix: $(Date:yyyyMMdd) trigger: tags: From e452a88b67c7e14c1d9188171188a0f883e3b7b4 Mon Sep 17 00:00:00 2001 From: Quin Lynch <49576606+quinchs@users.noreply.github.com> Date: Sun, 26 Sep 2021 14:20:09 -0300 Subject: [PATCH 06/10] Update deploy.yml --- azure/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure/deploy.yml b/azure/deploy.yml index 61994299e..cab5b3563 100644 --- a/azure/deploy.yml +++ b/azure/deploy.yml @@ -1,6 +1,6 @@ steps: - script: | - dotnet pack "src\Discord.Net.Core\Discord.Net.Core.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "$(Build.ArtifactStagingDirectory)" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag) + dotnet pack "src\Discord.Net.Core\Discord.Net.Core.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "$(Build.ArtifactStagingDirectory)" --version-suffix=$(buildNumber) /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag) dotnet pack "src\Discord.Net.Rest\Discord.Net.Rest.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "$(Build.ArtifactStagingDirectory)" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag) dotnet pack "src\Discord.Net.WebSocket\Discord.Net.WebSocket.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "$(Build.ArtifactStagingDirectory)" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag) dotnet pack "src\Discord.Net.Commands\Discord.Net.Commands.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "$(Build.ArtifactStagingDirectory)" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag) From 3babf8f31eea2f434f95e37d0611c490444d204f Mon Sep 17 00:00:00 2001 From: Quin Lynch <49576606+quinchs@users.noreply.github.com> Date: Sun, 26 Sep 2021 14:29:19 -0300 Subject: [PATCH 07/10] Remove version tag from proj --- src/Discord.Net.Core/Discord.Net.Core.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Discord.Net.Core/Discord.Net.Core.csproj b/src/Discord.Net.Core/Discord.Net.Core.csproj index b52aba214..036717e8d 100644 --- a/src/Discord.Net.Core/Discord.Net.Core.csproj +++ b/src/Discord.Net.Core/Discord.Net.Core.csproj @@ -8,12 +8,9 @@ net461;netstandard2.0;netstandard2.1 netstandard2.0;netstandard2.1 Discord.Net.Labs.Core - 3.1.1 Discord.Net.Labs.Core https://github.com/Discord-Net-Labs/Discord.Net-Labs Temporary.png - 3.1.1 - 3.1.1 false From c28ceeb986c05e821bd49065484c2819c1d39326 Mon Sep 17 00:00:00 2001 From: Quin Lynch <49576606+quinchs@users.noreply.github.com> Date: Sun, 26 Sep 2021 14:32:43 -0300 Subject: [PATCH 08/10] Update deploy.yml --- azure/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure/deploy.yml b/azure/deploy.yml index cab5b3563..61994299e 100644 --- a/azure/deploy.yml +++ b/azure/deploy.yml @@ -1,6 +1,6 @@ steps: - script: | - dotnet pack "src\Discord.Net.Core\Discord.Net.Core.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "$(Build.ArtifactStagingDirectory)" --version-suffix=$(buildNumber) /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag) + dotnet pack "src\Discord.Net.Core\Discord.Net.Core.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "$(Build.ArtifactStagingDirectory)" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag) dotnet pack "src\Discord.Net.Rest\Discord.Net.Rest.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "$(Build.ArtifactStagingDirectory)" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag) dotnet pack "src\Discord.Net.WebSocket\Discord.Net.WebSocket.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "$(Build.ArtifactStagingDirectory)" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag) dotnet pack "src\Discord.Net.Commands\Discord.Net.Commands.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "$(Build.ArtifactStagingDirectory)" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag) From 9c914419ab59e6e77fa94800f2395f158eb15ed7 Mon Sep 17 00:00:00 2001 From: Quin Lynch <49576606+quinchs@users.noreply.github.com> Date: Sun, 26 Sep 2021 14:35:17 -0300 Subject: [PATCH 09/10] Removed versions from project files --- .../Discord.Net.Commands.csproj | 1 - src/Discord.Net.Rest/Discord.Net.Rest.csproj | 3 --- .../Discord - Backup.Net.WebSocket.csproj | 27 ------------------- .../Discord.Net.WebSocket.csproj | 3 --- .../Discord.Net.Webhook.csproj | 1 - 5 files changed, 35 deletions(-) delete mode 100644 src/Discord.Net.WebSocket/Discord - Backup.Net.WebSocket.csproj diff --git a/src/Discord.Net.Commands/Discord.Net.Commands.csproj b/src/Discord.Net.Commands/Discord.Net.Commands.csproj index 84bc5b84b..4f6a47c15 100644 --- a/src/Discord.Net.Commands/Discord.Net.Commands.csproj +++ b/src/Discord.Net.Commands/Discord.Net.Commands.csproj @@ -7,7 +7,6 @@ A Discord.Net Labs extension adding support for bot commands. net461;netstandard2.0;netstandard2.1 netstandard2.0;netstandard2.1 - 3.0.1 Discord.Net.Labs.Commands https://github.com/Discord-Net-Labs/Discord.Net-Labs https://github.com/Discord-Net-Labs/Discord.Net-Labs diff --git a/src/Discord.Net.Rest/Discord.Net.Rest.csproj b/src/Discord.Net.Rest/Discord.Net.Rest.csproj index fcc005402..725feb766 100644 --- a/src/Discord.Net.Rest/Discord.Net.Rest.csproj +++ b/src/Discord.Net.Rest/Discord.Net.Rest.csproj @@ -9,11 +9,8 @@ netstandard2.0;netstandard2.1 Temporary.png https://github.com/Discord-Net-Labs/Discord.Net-Labs - 3.1.1 Discord.Net.Labs.Rest https://github.com/Discord-Net-Labs/Discord.Net-Labs - 3.1.1 - 3.1.1 ..\Discord.Net.Rest\Discord.Net.Rest.xml diff --git a/src/Discord.Net.WebSocket/Discord - Backup.Net.WebSocket.csproj b/src/Discord.Net.WebSocket/Discord - Backup.Net.WebSocket.csproj deleted file mode 100644 index e3a5104e7..000000000 --- a/src/Discord.Net.WebSocket/Discord - Backup.Net.WebSocket.csproj +++ /dev/null @@ -1,27 +0,0 @@ - - - - - Discord.Net.WebSocket - Discord.WebSocket - A core Discord.Net Labs library containing the WebSocket client and models. - net461;netstandard2.0;netstandard2.1 - netstandard2.0;netstandard2.1 - true - 2.3.1 - https://github.com/Discord-Net-Labs/Discord.Net-Labs - https://github.com/Discord-Net-Labs/Discord.Net-Labs - Temporary.png - Discord.Net.Labs.WebSocket - - - - - - - - True - - - - diff --git a/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj b/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj index 4947db946..992c789c5 100644 --- a/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj +++ b/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj @@ -8,7 +8,6 @@ net461;netstandard2.0;netstandard2.1 netstandard2.0;netstandard2.1 true - 3.1.1 https://github.com/Discord-Net-Labs/Discord.Net-Labs https://github.com/Discord-Net-Labs/Discord.Net-Labs Temporary.png @@ -16,8 +15,6 @@ ..\Discord.Net.WebSocket\Discord.Net.WebSocket.xml - 3.1.1 - 3.1.1 TRACE diff --git a/src/Discord.Net.Webhook/Discord.Net.Webhook.csproj b/src/Discord.Net.Webhook/Discord.Net.Webhook.csproj index cf9d10de1..ac654d4a6 100644 --- a/src/Discord.Net.Webhook/Discord.Net.Webhook.csproj +++ b/src/Discord.Net.Webhook/Discord.Net.Webhook.csproj @@ -6,7 +6,6 @@ Discord.Webhook A core Discord.Net Labs library containing the Webhook client and models. netstandard2.0;netstandard2.1 - 3.0.0 Discord.Net.Labs.Webhook https://github.com/Discord-Net-Labs/Discord.Net-Labs https://github.com/Discord-Net-Labs/Discord.Net-Labs From d5805a09a34b0d02299ad9498447a798c758a76d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Hjorth=C3=B8j?= Date: Sun, 26 Sep 2021 22:20:50 +0200 Subject: [PATCH 10/10] Removed style of the nuget badge and added logo (#201) The style was not properly added to it and the plastic version does not look good with the discord badge. I thought it would look better with a logo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f8e4d2839..4074c1c17 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Discord.Net Labs -[![NuGet](https://img.shields.io/nuget/vpre/Discord.Net.Labs.svg?maxAge=2592000?style=plastic)](https://www.nuget.org/packages/Discord.Net.Labs) +[![NuGet](https://img.shields.io/nuget/vpre/Discord.Net.Labs.svg?maxAge=2592000&logo=nuget)](https://www.nuget.org/packages/Discord.Net.Labs) [![Discord](https://discord.com/api/guilds/848176216011046962/widget.png)](https://discord.gg/dvSfUTet3K) This repo is a custom fork of Discord.Net that introduces the newest features of discord for testing and experimenting. Nothing here is guaranteed to work but you are more than welcome to submit bugs in the issues tabs